ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Nat.exists_coprime
File: .lake/packages/batteries/Batteries/Data/Nat/Gcd.lean

Proof steps:
state_before: m n : Nat
⊢ ∃ m' n', m'.Coprime n' ∧ m = m' * m.gcd n ∧ n = n' * m.gcd n
state_after: no goals
tactic: cases eq_zero_or_pos (gcd m n) with
  | inl h0 =>
    rw [gcd_eq_zero_iff] at h0
    refine ⟨1, 1, gcd_one_left 1, ?_⟩
    simp [h0]
  | inr hpos =>
    exact ⟨_, _, coprime_div_gcd_div_gcd hpos,
      (Nat.div_mul_cancel (gcd_dvd_left m n)).symm,
      (Nat.div_mul_cancel (gcd_dvd_right m n)).symm⟩
Theorem: Nat.prod_mem_smoothNumbers
File: Mathlib/NumberTheory/SmoothNumbers.lean

Proof steps:
state_before: n N : ℕ
⊢ (List.filter (fun x => decide (x < N)) n.primeFactorsList).prod ∈ N.smoothNumbers
state_after: no goals
tactic: simp only [smoothNumbers_eq_factoredNumbers, ← Finset.mem_range, prod_mem_factoredNumbers]
Theorem: CategoryTheory.Limits.Fork.app_one_eq_ι_comp_left
File: Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : C
f g : X ⟶ Y
s : Fork f g
⊢ s.π.app one = s.ι ≫ f
state_after: no goals
tactic: rw [← s.app_zero_eq_ι, ← s.w left, parallelPair_map_left]
Theorem: PythagoreanTriple.coprime_classification'
File: Mathlib/NumberTheory/PythagoreanTriples.lean

Proof steps:
state_before: x✝ y✝ z✝ : ℤ
h✝ : PythagoreanTriple x✝ y✝ z✝
x y z : ℤ
h : PythagoreanTriple x y z
h_coprime : x.gcd y = 1
h_parity : x % 2 = 1
h_pos : 0 < z
⊢ ∃ m n,
    x = m ^ 2 - n ^ 2 ∧
      y = 2 * m * n ∧ z = m ^ 2 + n ^ 2 ∧ m.gcd n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0) ∧ 0 ≤ m
state_after: case intro.intro.intro.intro.intro
x✝ y✝ z✝ : ℤ
h✝ : PythagoreanTriple x✝ y✝ z✝
x y z : ℤ
h : PythagoreanTriple x y z
h_coprime : x.gcd y = 1
h_parity : x % 2 = 1
h_pos : 0 < z
m n : ℤ
ht1 : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2
ht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)
ht3 : m.gcd n = 1
ht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0
⊢ ∃ m n,
    x = m ^ 2 - n ^ 2 ∧
      y = 2 * m * n ∧ z = m ^ 2 + n ^ 2 ∧ m.gcd n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0) ∧ 0 ≤ m
tactic: obtain ⟨m, n, ht1, ht2, ht3, ht4⟩ :=
    PythagoreanTriple.coprime_classification.mp (And.intro h h_coprime)
state_before: case intro.intro.intro.intro.intro
x✝ y✝ z✝ : ℤ
h✝ : PythagoreanTriple x✝ y✝ z✝
x y z : ℤ
h : PythagoreanTriple x y z
h_coprime : x.gcd y = 1
h_parity : x % 2 = 1
h_pos : 0 < z
m n : ℤ
ht1 : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2
ht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)
ht3 : m.gcd n = 1
ht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0
⊢ ∃ m n,
    x = m ^ 2 - n ^ 2 ∧
      y = 2 * m * n ∧ z = m ^ 2 + n ^ 2 ∧ m.gcd n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0) ∧ 0 ≤ m
state_after: case intro.intro.intro.intro.intro.inl
x✝ y✝ z✝ : ℤ
h✝ : PythagoreanTriple x✝ y✝ z✝
x y z : ℤ
h : PythagoreanTriple x y z
h_coprime : x.gcd y = 1
h_parity : x % 2 = 1
h_pos : 0 < z
m n : ℤ
ht1 : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2
ht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)
ht3 : m.gcd n = 1
ht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0
hm : 0 ≤ m
⊢ ∃ m n,
    x = m ^ 2 - n ^ 2 ∧
      y = 2 * m * n ∧ z = m ^ 2 + n ^ 2 ∧ m.gcd n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0) ∧ 0 ≤ m

case intro.intro.intro.intro.intro.inr
x✝ y✝ z✝ : ℤ
h✝ : PythagoreanTriple x✝ y✝ z✝
x y z : ℤ
h : PythagoreanTriple x y z
h_coprime : x.gcd y = 1
h_parity : x % 2 = 1
h_pos : 0 < z
m n : ℤ
ht1 : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2
ht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)
ht3 : m.gcd n = 1
ht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0
hm : m < 0
⊢ ∃ m n,
    x = m ^ 2 - n ^ 2 ∧
      y = 2 * m * n ∧ z = m ^ 2 + n ^ 2 ∧ m.gcd n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0) ∧ 0 ≤ m
tactic: rcases le_or_lt 0 m with hm | hm
Theorem: CategoryTheory.Functor.uncurry_obj_curry_obj
File: Mathlib/CategoryTheory/Functor/Currying.lean

Proof steps:
state_before: B : Type u₁
inst✝⁴ : Category.{v₁, u₁} B
C : Type u₂
inst✝³ : Category.{v₂, u₂} C
D : Type u₃
inst✝² : Category.{v₃, u₃} D
E : Type u₄
inst✝¹ : Category.{v₄, u₄} E
H : Type u₅
inst✝ : Category.{v₅, u₅} H
F : B × C ⥤ D
⊢ ∀ (X : B × C), (uncurry.obj (curry.obj F)).obj X = F.obj X
state_after: no goals
tactic: simp
state_before: B : Type u₁
inst✝⁴ : Category.{v₁, u₁} B
C : Type u₂
inst✝³ : Category.{v₂, u₂} C
D : Type u₃
inst✝² : Category.{v₃, u₃} D
E : Type u₄
inst✝¹ : Category.{v₄, u₄} E
H : Type u₅
inst✝ : Category.{v₅, u₅} H
F : B × C ⥤ D
x✝² x✝¹ : B × C
x₁ : B
x₂ : C
y₁ : B
y₂ : C
x✝ : (x₁, x₂) ⟶ (y₁, y₂)
f₁ : (x₁, x₂).1 ⟶ (y₁, y₂).1
f₂ : (x₁, x₂).2 ⟶ (y₁, y₂).2
⊢ (uncurry.obj (curry.obj F)).map (f₁, f₂) = eqToHom ⋯ ≫ F.map (f₁, f₂) ≫ eqToHom ⋯
state_after: B : Type u₁
inst✝⁴ : Category.{v₁, u₁} B
C : Type u₂
inst✝³ : Category.{v₂, u₂} C
D : Type u₃
inst✝² : Category.{v₃, u₃} D
E : Type u₄
inst✝¹ : Category.{v₄, u₄} E
H : Type u₅
inst✝ : Category.{v₅, u₅} H
F : B × C ⥤ D
x✝² x✝¹ : B × C
x₁ : B
x₂ : C
y₁ : B
y₂ : C
x✝ : (x₁, x₂) ⟶ (y₁, y₂)
f₁ : (x₁, x₂).1 ⟶ (y₁, y₂).1
f₂ : (x₁, x₂).2 ⟶ (y₁, y₂).2
⊢ F.map (f₁, 𝟙 x₂) ≫ F.map (𝟙 y₁, f₂) = 𝟙 (F.obj (x₁, x₂)) ≫ F.map (f₁, f₂) ≫ 𝟙 (F.obj (y₁, y₂))
tactic: dsimp
state_before: B : Type u₁
inst✝⁴ : Category.{v₁, u₁} B
C : Type u₂
inst✝³ : Category.{v₂, u₂} C
D : Type u₃
inst✝² : Category.{v₃, u₃} D
E : Type u₄
inst✝¹ : Category.{v₄, u₄} E
H : Type u₅
inst✝ : Category.{v₅, u₅} H
F : B × C ⥤ D
x✝² x✝¹ : B × C
x₁ : B
x₂ : C
y₁ : B
y₂ : C
x✝ : (x₁, x₂) ⟶ (y₁, y₂)
f₁ : (x₁, x₂).1 ⟶ (y₁, y₂).1
f₂ : (x₁, x₂).2 ⟶ (y₁, y₂).2
⊢ F.map (f₁, 𝟙 x₂) ≫ F.map (𝟙 y₁, f₂) = 𝟙 (F.obj (x₁, x₂)) ≫ F.map (f₁, f₂) ≫ 𝟙 (F.obj (y₁, y₂))
state_after: no goals
tactic: simp only [← F.map_comp, Category.id_comp, Category.comp_id, prod_comp]
Theorem: LinearMap.norm_extendTo𝕜'_apply_sq
File: Mathlib/Analysis/NormedSpace/Extend.lean

Proof steps:
state_before: 𝕜 : Type u_1
inst✝⁴ : RCLike 𝕜
F : Type u_2
inst✝³ : SeminormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : Module ℝ F
inst✝ : IsScalarTower ℝ 𝕜 F
fr : F →ₗ[ℝ] ℝ
x : F
⊢ ‖fr.extendTo𝕜' x‖ ^ 2 = re ((starRingEnd 𝕜) (fr.extendTo𝕜' x) * fr.extendTo𝕜' x)
state_after: no goals
tactic: rw [RCLike.conj_mul, ← ofReal_pow, ofReal_re]
state_before: 𝕜 : Type u_1
inst✝⁴ : RCLike 𝕜
F : Type u_2
inst✝³ : SeminormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : Module ℝ F
inst✝ : IsScalarTower ℝ 𝕜 F
fr : F →ₗ[ℝ] ℝ
x : F
⊢ re ((starRingEnd 𝕜) (fr.extendTo𝕜' x) * fr.extendTo𝕜' x) = fr ((starRingEnd 𝕜) (fr.extendTo𝕜' x) • x)
state_after: no goals
tactic: rw [← smul_eq_mul, ← map_smul, extendTo𝕜'_apply_re]
Theorem: IsKleinFour.mul_self
File: Mathlib/GroupTheory/SpecificGroups/KleinFour.lean

Proof steps:
state_before: G : Type u_1
inst✝¹ : Group G
inst✝ : IsKleinFour G
x : G
⊢ x * x = 1
state_after: no goals
tactic: rw [mul_eq_one_iff_eq_inv, inv_eq_self]
Theorem: ContinuousLinearMap.hasFPowerSeriesOnBall_bilinear
File: Mathlib/Analysis/Analytic/Linear.lean

Proof steps:
state_before: 𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
G : Type u_4
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f : E →L[𝕜] F →L[𝕜] G
x : E × F
⊢ ⊤ ≤ (f.fpowerSeriesBilinear x).radius
state_after: no goals
tactic: simp
state_before: 𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
G : Type u_4
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f : E →L[𝕜] F →L[𝕜] G
x y✝ : E × F
x✝ : y✝ ∈ EMetric.ball 0 ⊤
⊢ HasSum (fun n => (f.fpowerSeriesBilinear x (n + 3)) fun x => y✝)
    ((f (x + y✝).1) (x + y✝).2 - ∑ i ∈ Finset.range 3, (f.fpowerSeriesBilinear x i) fun x => y✝)
state_after: 𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
G : Type u_4
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f : E →L[𝕜] F →L[𝕜] G
x y✝ : E × F
x✝ : y✝ ∈ EMetric.ball 0 ⊤
⊢ HasSum (fun n => (f.fpowerSeriesBilinear x (n + 3)) fun x => y✝)
    ((f x.1) x.2 + (f.deriv₂ (x.1, x.2)) (y✝.1, y✝.2) + (f y✝.1) y✝.2 -
      ((((∑ x_1 ∈ Finset.range 0, (f.fpowerSeriesBilinear x x_1) fun x => y✝) +
            (f.fpowerSeriesBilinear x 0) fun x => y✝) +
          (f.fpowerSeriesBilinear x 1) fun x => y✝) +
        (f.fpowerSeriesBilinear x 2) fun x => y✝))
tactic: simp only [Finset.sum_range_succ, Finset.sum_range_one, Prod.fst_add, Prod.snd_add,
          f.map_add_add]
state_before: 𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
G : Type u_4
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f : E →L[𝕜] F →L[𝕜] G
x y✝ : E × F
x✝ : y✝ ∈ EMetric.ball 0 ⊤
⊢ HasSum (fun n => (f.fpowerSeriesBilinear x (n + 3)) fun x => y✝)
    ((f x.1) x.2 + (f.deriv₂ (x.1, x.2)) (y✝.1, y✝.2) + (f y✝.1) y✝.2 -
      ((((∑ x_1 ∈ Finset.range 0, (f.fpowerSeriesBilinear x x_1) fun x => y✝) +
            (f.fpowerSeriesBilinear x 0) fun x => y✝) +
          (f.fpowerSeriesBilinear x 1) fun x => y✝) +
        (f.fpowerSeriesBilinear x 2) fun x => y✝))
state_after: no goals
tactic: simp [fpowerSeriesBilinear, hasSum_zero]
Theorem: List.length_sym
File: Mathlib/Data/List/Sym.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
xs✝ ys : List α
n✝ n : ℕ
xs x✝ : List α
⊢ (List.sym 0 x✝).length = x✝.length.multichoose 0
state_after: α : Type u_1
β : Type u_2
xs✝ ys : List α
n✝ n : ℕ
xs x✝ : List α
⊢ [Sym.nil].length = 1
tactic: rw [List.sym, Nat.multichoose]
state_before: α : Type u_1
β : Type u_2
xs✝ ys : List α
n✝ n : ℕ
xs x✝ : List α
⊢ [Sym.nil].length = 1
state_after: no goals
tactic: rfl
state_before: α : Type u_1
β : Type u_2
xs✝ ys : List α
n✝¹ n✝ : ℕ
xs : List α
n : ℕ
⊢ (List.sym (n + 1) []).length = [].length.multichoose (n + 1)
state_after: no goals
tactic: simp [List.sym]
state_before: α : Type u_1
β : Type u_2
xs✝¹ ys : List α
n✝¹ n✝ : ℕ
xs✝ : List α
n : ℕ
x : α
xs : List α
⊢ (List.sym (n + 1) (x :: xs)).length = (x :: xs).length.multichoose (n + 1)
state_after: α : Type u_1
β : Type u_2
xs✝¹ ys : List α
n✝¹ n✝ : ℕ
xs✝ : List α
n : ℕ
x : α
xs : List α
⊢ (List.sym n (x :: xs)).length + (List.sym (n + 1) xs).length = (xs.length + 1).multichoose (n + 1)
tactic: rw [List.sym, length_append, length_map, length_cons]
state_before: α : Type u_1
β : Type u_2
xs✝¹ ys : List α
n✝¹ n✝ : ℕ
xs✝ : List α
n : ℕ
x : α
xs : List α
⊢ (List.sym n (x :: xs)).length + (List.sym (n + 1) xs).length = (xs.length + 1).multichoose (n + 1)
state_after: α : Type u_1
β : Type u_2
xs✝¹ ys : List α
n✝¹ n✝ : ℕ
xs✝ : List α
n : ℕ
x : α
xs : List α
⊢ (x :: xs).length.multichoose n + xs.length.multichoose (n + 1) = (xs.length + 1).multichoose (n + 1)
tactic: rw [@length_sym n (x :: xs), @length_sym (n + 1) xs]
state_before: α : Type u_1
β : Type u_2
xs✝¹ ys : List α
n✝¹ n✝ : ℕ
xs✝ : List α
n : ℕ
x : α
xs : List α
⊢ (x :: xs).length.multichoose n + xs.length.multichoose (n + 1) = (xs.length + 1).multichoose (n + 1)
state_after: no goals
tactic: rw [Nat.multichoose_succ_succ, length_cons, add_comm]
Theorem: PNat.div_add_mod'
File: Mathlib/Data/PNat/Basic.lean

Proof steps:
state_before: m k : ℕ+
⊢ m.div k * ↑k + ↑(m.mod k) = ↑m
state_after: m k : ℕ+
⊢ ↑k * m.div k + ↑(m.mod k) = ↑m
tactic: rw [mul_comm]
state_before: m k : ℕ+
⊢ ↑k * m.div k + ↑(m.mod k) = ↑m
state_after: no goals
tactic: exact div_add_mod _ _
Theorem: Finset.mem_addSpan
File: Mathlib/Combinatorics/Additive/Dissociation.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝³ : CommGroup α
inst✝² : CommGroup β
inst✝¹ : DecidableEq α
inst✝ : Fintype α
s t u : Finset α
a : α
d : ℕ
⊢ a ∈ s.mulSpan ↔ ∃ ε, (∀ (a : α), ε a = -1 ∨ ε a = 0 ∨ ε a = 1) ∧ ∏ a ∈ s, a ^ ε a = a
state_after: no goals
tactic: simp [mulSpan]
Theorem: PiNat.exists_retraction_of_isClosed
File: Mathlib/Topology/MetricSpace/PiNat.lean

Proof steps:
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
hne : s.Nonempty
⊢ ∃ f, (∀ x ∈ s, f x = x) ∧ range f = s ∧ Continuous f
state_after: case intro.intro.intro
E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
hne : s.Nonempty
f : ((n : ℕ) → E n) → (n : ℕ) → E n
fs : ∀ x ∈ s, f x = x
frange : range f = s
hf : LipschitzWith 1 f
⊢ ∃ f, (∀ x ∈ s, f x = x) ∧ range f = s ∧ Continuous f
tactic: rcases exists_lipschitz_retraction_of_isClosed hs hne with ⟨f, fs, frange, hf⟩
state_before: case intro.intro.intro
E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
hne : s.Nonempty
f : ((n : ℕ) → E n) → (n : ℕ) → E n
fs : ∀ x ∈ s, f x = x
frange : range f = s
hf : LipschitzWith 1 f
⊢ ∃ f, (∀ x ∈ s, f x = x) ∧ range f = s ∧ Continuous f
state_after: no goals
tactic: exact ⟨f, fs, frange, hf.continuous⟩
Theorem: Filter.HasBasis.blimsup_eq_iInf_iSup
File: Mathlib/Order/LiminfLimsup.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteLattice α
p : ι → Prop
s : ι → Set β
f : Filter β
u : β → α
hf : f.HasBasis p s
q : β → Prop
⊢ blimsup u f q = ⨅ i, ⨅ (_ : p i), ⨆ a ∈ s i, ⨆ (_ : q a), u a
state_after: no goals
tactic: simp only [blimsup_eq_limsup, (hf.inf_principal _).limsup_eq_iInf_iSup, mem_inter_iff, iSup_and,
    mem_setOf_eq]
Theorem: Int.gcd_eq_gcd_ab
File: Mathlib/Data/Int/GCD.lean

Proof steps:
state_before: m n : ℕ
⊢ ↑((↑m).gcd -[n+1]) = ↑m * (↑m).gcdA -[n+1] + -(↑n + 1) * -(↑m).natAbs.gcdB n.succ
state_after: m n : ℕ
⊢ ↑((↑m).gcd -[n+1]) = ↑m * (↑m).gcdA -[n+1] + (↑n + 1) * (↑m).natAbs.gcdB n.succ
tactic: rw [Int.neg_mul_neg]
state_before: m n : ℕ
⊢ ↑((↑m).gcd -[n+1]) = ↑m * (↑m).gcdA -[n+1] + (↑n + 1) * (↑m).natAbs.gcdB n.succ
state_after: no goals
tactic: apply Nat.gcd_eq_gcd_ab
state_before: m n : ℕ
⊢ ↑(-[m+1].gcd ↑n) = -(↑m + 1) * -m.succ.gcdA (↑n).natAbs + ↑n * -[m+1].gcdB ↑n
state_after: m n : ℕ
⊢ ↑(-[m+1].gcd ↑n) = (↑m + 1) * m.succ.gcdA (↑n).natAbs + ↑n * -[m+1].gcdB ↑n
tactic: rw [Int.neg_mul_neg]
state_before: m n : ℕ
⊢ ↑(-[m+1].gcd ↑n) = (↑m + 1) * m.succ.gcdA (↑n).natAbs + ↑n * -[m+1].gcdB ↑n
state_after: no goals
tactic: apply Nat.gcd_eq_gcd_ab
state_before: m n : ℕ
⊢ ↑(-[m+1].gcd -[n+1]) = -(↑m + 1) * -m.succ.gcdA -[n+1].natAbs + -(↑n + 1) * - -[m+1].natAbs.gcdB n.succ
state_after: m n : ℕ
⊢ ↑(-[m+1].gcd -[n+1]) = (↑m + 1) * m.succ.gcdA -[n+1].natAbs + (↑n + 1) * -[m+1].natAbs.gcdB n.succ
tactic: rw [Int.neg_mul_neg, Int.neg_mul_neg]
state_before: m n : ℕ
⊢ ↑(-[m+1].gcd -[n+1]) = (↑m + 1) * m.succ.gcdA -[n+1].natAbs + (↑n + 1) * -[m+1].natAbs.gcdB n.succ
state_after: no goals
tactic: apply Nat.gcd_eq_gcd_ab
Theorem: Real.le_toNNReal_iff_coe_le'
File: Mathlib/Data/NNReal/Basic.lean

Proof steps:
state_before: r : ℝ≥0
p : ℝ
hr : 0 < r
hp : p < 0
⊢ r ≤ p.toNNReal ↔ ↑r ≤ p
state_after: no goals
tactic: simp only [(hp.trans_le r.coe_nonneg).not_le, toNNReal_eq_zero.2 hp.le, hr.not_le]
Theorem: Matrix.col_vecMul
File: Mathlib/Data/Matrix/RowCol.lean

Proof steps:
state_before: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
R : Type u_5
α : Type v
β : Type w
ι : Type u_6
inst✝¹ : Fintype m
inst✝ : NonUnitalNonAssocSemiring α
M : Matrix m n α
v : m → α
⊢ col ι (v ᵥ* M) = (row ι v * M)ᵀ
state_after: case a
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
R : Type u_5
α : Type v
β : Type w
ι : Type u_6
inst✝¹ : Fintype m
inst✝ : NonUnitalNonAssocSemiring α
M : Matrix m n α
v : m → α
i✝ : n
j✝ : ι
⊢ col ι (v ᵥ* M) i✝ j✝ = (row ι v * M)ᵀ i✝ j✝
tactic: ext
state_before: case a
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
R : Type u_5
α : Type v
β : Type w
ι : Type u_6
inst✝¹ : Fintype m
inst✝ : NonUnitalNonAssocSemiring α
M : Matrix m n α
v : m → α
i✝ : n
j✝ : ι
⊢ col ι (v ᵥ* M) i✝ j✝ = (row ι v * M)ᵀ i✝ j✝
state_after: no goals
tactic: rfl
Theorem: NNReal.exists_pos_sum_of_countable
File: Mathlib/Analysis/SpecificLimits/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
ι✝ : Type u_3
ε : ℝ≥0
hε : ε ≠ 0
ι : Type u_4
inst✝ : Countable ι
⊢ ∃ ε', (∀ (i : ι), 0 < ε' i) ∧ ∃ c, HasSum ε' c ∧ c < ε
state_after: case intro
α : Type u_1
β : Type u_2
ι✝ : Type u_3
ε : ℝ≥0
hε : ε ≠ 0
ι : Type u_4
inst✝ : Countable ι
val✝ : Encodable ι
⊢ ∃ ε', (∀ (i : ι), 0 < ε' i) ∧ ∃ c, HasSum ε' c ∧ c < ε
tactic: cases nonempty_encodable ι
state_before: case intro
α : Type u_1
β : Type u_2
ι✝ : Type u_3
ε : ℝ≥0
hε : ε ≠ 0
ι : Type u_4
inst✝ : Countable ι
val✝ : Encodable ι
⊢ ∃ ε', (∀ (i : ι), 0 < ε' i) ∧ ∃ c, HasSum ε' c ∧ c < ε
state_after: case intro.intro.intro
α : Type u_1
β : Type u_2
ι✝ : Type u_3
ε : ℝ≥0
hε : ε ≠ 0
ι : Type u_4
inst✝ : Countable ι
val✝ : Encodable ι
a : ℝ≥0
a0 : 0 < a
aε : a < ε
⊢ ∃ ε', (∀ (i : ι), 0 < ε' i) ∧ ∃ c, HasSum ε' c ∧ c < ε
tactic: obtain ⟨a, a0, aε⟩ := exists_between (pos_iff_ne_zero.2 hε)
state_before: case intro.intro.intro
α : Type u_1
β : Type u_2
ι✝ : Type u_3
ε : ℝ≥0
hε : ε ≠ 0
ι : Type u_4
inst✝ : Countable ι
val✝ : Encodable ι
a : ℝ≥0
a0 : 0 < a
aε : a < ε
⊢ ∃ ε', (∀ (i : ι), 0 < ε' i) ∧ ∃ c, HasSum ε' c ∧ c < ε
state_after: case intro.intro.intro.mk.intro.intro.intro
α : Type u_1
β : Type u_2
ι✝ : Type u_3
ε : ℝ≥0
hε : ε ≠ 0
ι : Type u_4
inst✝ : Countable ι
val✝ : Encodable ι
a : ℝ≥0
a0 : 0 < a
aε : a < ε
ε' : ι → ℝ
hε' : ∀ (i : ι), 0 < ε' i
c : ℝ
hc : HasSum ε' c
hcε : c ≤ (fun a => ↑a) a
⊢ ∃ ε', (∀ (i : ι), 0 < ε' i) ∧ ∃ c, HasSum ε' c ∧ c < ε
tactic: obtain ⟨ε', hε', c, hc, hcε⟩ := posSumOfEncodable a0 ι
state_before: case intro.intro.intro.mk.intro.intro.intro
α : Type u_1
β : Type u_2
ι✝ : Type u_3
ε : ℝ≥0
hε : ε ≠ 0
ι : Type u_4
inst✝ : Countable ι
val✝ : Encodable ι
a : ℝ≥0
a0 : 0 < a
aε : a < ε
ε' : ι → ℝ
hε' : ∀ (i : ι), 0 < ε' i
c : ℝ
hc : HasSum ε' c
hcε : c ≤ (fun a => ↑a) a
⊢ ∃ ε', (∀ (i : ι), 0 < ε' i) ∧ ∃ c, HasSum ε' c ∧ c < ε
state_after: no goals
tactic: exact
    ⟨fun i ↦ ⟨ε' i, (hε' i).le⟩, fun i ↦ NNReal.coe_lt_coe.1 <| hε' i,
      ⟨c, hasSum_le (fun i ↦ (hε' i).le) hasSum_zero hc⟩, NNReal.hasSum_coe.1 hc,
      aε.trans_le' <| NNReal.coe_le_coe.1 hcε⟩
Theorem: orderOf_eq_prime
File: Mathlib/GroupTheory/OrderOfElement.lean

Proof steps:
state_before: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : Monoid G
a b x y : G
n m p : ℕ
hp : Fact (Nat.Prime p)
hg : x ^ p = 1
hg1 : x ≠ 1
⊢ ¬IsFixedPt (fun x_1 => x * x_1) 1
state_after: no goals
tactic: rwa [IsFixedPt, mul_one]
Theorem: Filter.HasBasis.map
File: Mathlib/Order/Filter/Bases.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
l l' : Filter α
p : ι → Prop
s : ι → Set α
t✝ : Set α
i : ι
p' : ι' → Prop
s' : ι' → Set α
i' : ι'
f : α → β
hl : l.HasBasis p s
t : Set β
⊢ t ∈ Filter.map f l ↔ ∃ i, p i ∧ f '' s i ⊆ t
state_after: no goals
tactic: simp only [mem_map, image_subset_iff, hl.mem_iff, preimage]
Theorem: inv_nonpos
File: Mathlib/Algebra/Order/Field/Unbundled/Basic.lean

Proof steps:
state_before: α : Type u_1
inst✝³ : Semifield α
inst✝² : LinearOrder α
inst✝¹ : PosMulReflectLT α
inst✝ : ZeroLEOneClass α
a b : α
⊢ a⁻¹ ≤ 0 ↔ a ≤ 0
state_after: no goals
tactic: simp only [← not_lt, inv_pos]
Theorem: CategoryTheory.ShortComplex.exact_iff_epi_imageToKernel
File: Mathlib/CategoryTheory/Abelian/Exact.lean

Proof steps:
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : Abelian C
S : ShortComplex C
⊢ S.Exact ↔ Epi (imageToKernel S.f S.g ⋯)
state_after: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : Abelian C
S : ShortComplex C
⊢ Epi (imageToKernel' S.f S.g ⋯) ↔ Epi (imageToKernel S.f S.g ⋯)
tactic: rw [S.exact_iff_epi_imageToKernel']
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : Abelian C
S : ShortComplex C
⊢ Epi (imageToKernel' S.f S.g ⋯) ↔ Epi (imageToKernel S.f S.g ⋯)
state_after: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : Abelian C
S : ShortComplex C
⊢ Arrow.mk (imageToKernel' S.f S.g ⋯) ≅ Arrow.mk (imageToKernel S.f S.g ⋯)
tactic: apply (MorphismProperty.epimorphisms C).arrow_mk_iso_iff
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : Abelian C
S : ShortComplex C
⊢ Arrow.mk (imageToKernel' S.f S.g ⋯) ≅ Arrow.mk (imageToKernel S.f S.g ⋯)
state_after: no goals
tactic: exact Arrow.isoMk (imageSubobjectIso S.f).symm (kernelSubobjectIso S.g).symm
Theorem: String.leftpad_length
File: Mathlib/Data/String/Lemmas.lean

Proof steps:
state_before: n : ℕ
c : Char
s : List Char
⊢ (leftpad n c { data := s }).length = max n { data := s }.length
state_after: no goals
tactic: simp only [leftpad, String.length, List.leftpad_length]
Theorem: CategoryTheory.Limits.limit.id_pre
File: Mathlib/CategoryTheory/Limits/HasLimits.lean

Proof steps:
state_before: J : Type u₁
inst✝³ : Category.{v₁, u₁} J
K : Type u₂
inst✝² : Category.{v₂, u₂} K
C : Type u
inst✝¹ : Category.{v, u} C
F✝ : J ⥤ C
inst✝ : HasLimitsOfShape J C
G : J ⥤ C
α : F✝ ⟶ G
F : J ⥤ C
⊢ pre F (𝟭 J) = lim.map F.leftUnitor.inv
state_after: no goals
tactic: aesop_cat
Theorem: Matroid.uniqueBaseOn_self
File: Mathlib/Data/Matroid/Constructions.lean

Proof steps:
state_before: α : Type u_1
M : Matroid α
E B I✝ X R J I : Set α
⊢ uniqueBaseOn I I = freeOn I
state_after: no goals
tactic: rw [uniqueBaseOn, freeOn_restrict rfl.subset]
Theorem: Rat.num_den_mk
File: Mathlib/Data/Rat/Lemmas.lean

Proof steps:
state_before: q : ℚ
n d : ℤ
hd : d ≠ 0
qdf : q = n /. d
⊢ ∃ c, n = c * q.num ∧ d = c * ↑q.den
state_after: case inl
q : ℚ
d : ℤ
hd : d ≠ 0
qdf : q = 0 /. d
⊢ ∃ c, 0 = c * q.num ∧ d = c * ↑q.den

case inr
q : ℚ
n d : ℤ
hd : d ≠ 0
qdf : q = n /. d
hn : n ≠ 0
⊢ ∃ c, n = c * q.num ∧ d = c * ↑q.den
tactic: obtain rfl | hn := eq_or_ne n 0
state_before: case inr
q : ℚ
n d : ℤ
hd : d ≠ 0
qdf : q = n /. d
hn : n ≠ 0
this : q.num * d = n * ↑q.den
⊢ ∃ c, n = c * q.num ∧ d = c * ↑q.den
state_after: case inr
q : ℚ
n d : ℤ
hd : d ≠ 0
qdf : q = n /. d
hn : n ≠ 0
this : q.num * d = n * ↑q.den
hqdn : q.num ∣ n
⊢ ∃ c, n = c * q.num ∧ d = c * ↑q.den
tactic: have hqdn : q.num ∣ n := by
    rw [qdf]
    exact Rat.num_dvd _ hd
state_before: case inr
q : ℚ
n d : ℤ
hd : d ≠ 0
qdf : q = n /. d
hn : n ≠ 0
this : q.num * d = n * ↑q.den
hqdn : q.num ∣ n
⊢ ∃ c, n = c * q.num ∧ d = c * ↑q.den
state_after: case inr.refine_1
q : ℚ
n d : ℤ
hd : d ≠ 0
qdf : q = n /. d
hn : n ≠ 0
this : q.num * d = n * ↑q.den
hqdn : q.num ∣ n
⊢ n = n / q.num * q.num

case inr.refine_2
q : ℚ
n d : ℤ
hd : d ≠ 0
qdf : q = n /. d
hn : n ≠ 0
this : q.num * d = n * ↑q.den
hqdn : q.num ∣ n
⊢ d = n / q.num * ↑q.den
tactic: refine ⟨n / q.num, ?_, ?_⟩
Theorem: CategoryTheory.Limits.Cofork.ofCocone_ι
File: Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : C
f g : X ⟶ Y
F : WalkingParallelPair ⥤ C
t : Cocone F
j : WalkingParallelPair
⊢ (parallelPair (F.map left) (F.map right)).obj j = F.obj j
state_after: no goals
tactic: aesop
Theorem: bihimp_eq_inf_himp_inf
File: Mathlib/Order/SymmDiff.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedHeytingAlgebra α
a b c d : α
⊢ a ⇔ b = a ⊔ b ⇨ a ⊓ b
state_after: no goals
tactic: simp [himp_inf_distrib, bihimp]
Theorem: Asymptotics.IsEquivalent.add_isLittleO
File: Mathlib/Analysis/Asymptotics/AsymptoticEquivalent.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : NormedAddCommGroup β
u v w : α → β
l : Filter α
huv : u ~[l] v
hwv : w =o[l] v
⊢ u + w ~[l] v
state_after: no goals
tactic: simpa only [IsEquivalent, add_sub_right_comm] using huv.add hwv
Theorem: Turing.TM2to1.addBottom_head_fst
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 σ
L : ListBlank ((k : K) → Option (Γ k))
⊢ (addBottom L).head.1 = true
state_after: no goals
tactic: rw [addBottom, ListBlank.head_cons]