ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: RCLike.inv_pos_of_pos
File: Mathlib/Analysis/RCLike/Basic.lean

Proof steps:
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z w : K
hz : 0 < z
⊢ 0 < z⁻¹
state_after: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z w : K
hz : ∃ x > 0, ↑x = z
⊢ 0 < z⁻¹
tactic: rw [pos_iff_exists_ofReal] at hz
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z w : K
hz : ∃ x > 0, ↑x = z
⊢ 0 < z⁻¹
state_after: case intro.intro
K : Type u_1
E : Type u_2
inst✝ : RCLike K
z w : K
x : ℝ
hx : x > 0
hx' : ↑x = z
⊢ 0 < z⁻¹
tactic: obtain ⟨x, hx, hx'⟩ := hz
state_before: case intro.intro
K : Type u_1
E : Type u_2
inst✝ : RCLike K
z w : K
x : ℝ
hx : x > 0
hx' : ↑x = z
⊢ 0 < z⁻¹
state_after: case intro.intro
K : Type u_1
E : Type u_2
inst✝ : RCLike K
z w : K
x : ℝ
hx : x > 0
hx' : ↑x = z
⊢ 0 < x⁻¹
tactic: rw [← hx', ← ofReal_inv, ofReal_pos]
state_before: case intro.intro
K : Type u_1
E : Type u_2
inst✝ : RCLike K
z w : K
x : ℝ
hx : x > 0
hx' : ↑x = z
⊢ 0 < x⁻¹
state_after: no goals
tactic: exact inv_pos_of_pos hx
Theorem: SimpleGraph.Subgraph.finset_card_neighborSet_eq_degree
File: Mathlib/Combinatorics/SimpleGraph/Subgraph.lean

Proof steps:
state_before: ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : G.Subgraph
a b : V
G' : G.Subgraph
v : V
inst✝ : Fintype ↑(G'.neighborSet v)
⊢ (G'.neighborSet v).toFinset.card = G'.degree v
state_after: no goals
tactic: rw [degree, Set.toFinset_card]
Theorem: Nat.zero_union_range_succ
File: Mathlib/Data/Nat/Set.lean

Proof steps:
state_before: ⊢ {0} ∪ range succ = univ
state_after: case h
n : ℕ
⊢ n ∈ {0} ∪ range succ ↔ n ∈ univ
tactic: ext n
state_before: case h
n : ℕ
⊢ n ∈ {0} ∪ range succ ↔ n ∈ univ
state_after: no goals
tactic: cases n <;> simp
Theorem: PowerSeries.trunc_trunc_of_le
File: Mathlib/RingTheory/PowerSeries/Trunc.lean

Proof steps:
state_before: R✝ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
n m : ℕ
f : R⟦X⟧
hnm : autoParam (n ≤ m) _auto✝
⊢ trunc n ↑(trunc m f) = trunc n f
state_after: case a
R✝ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
n m : ℕ
f : R⟦X⟧
hnm : autoParam (n ≤ m) _auto✝
d : ℕ
⊢ (trunc n ↑(trunc m f)).coeff d = (trunc n f).coeff d
tactic: ext d
state_before: case a
R✝ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
n m : ℕ
f : R⟦X⟧
hnm : autoParam (n ≤ m) _auto✝
d : ℕ
⊢ (trunc n ↑(trunc m f)).coeff d = (trunc n f).coeff d
state_after: case a
R✝ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
n m : ℕ
f : R⟦X⟧
hnm : autoParam (n ≤ m) _auto✝
d : ℕ
⊢ (if d < n then (trunc m f).coeff d else 0) = if d < n then (coeff R d) f else 0
tactic: rw [coeff_trunc, coeff_trunc, coeff_coe]
state_before: case a
R✝ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
n m : ℕ
f : R⟦X⟧
hnm : autoParam (n ≤ m) _auto✝
d : ℕ
⊢ (if d < n then (trunc m f).coeff d else 0) = if d < n then (coeff R d) f else 0
state_after: case pos
R✝ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
n m : ℕ
f : R⟦X⟧
hnm : autoParam (n ≤ m) _auto✝
d : ℕ
h : d < n
⊢ (trunc m f).coeff d = (coeff R d) f

case neg
R✝ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
n m : ℕ
f : R⟦X⟧
hnm : autoParam (n ≤ m) _auto✝
d : ℕ
h : ¬d < n
⊢ 0 = 0
tactic: split_ifs with h
Theorem: Substring.ValidFor.takeWhile
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

Proof steps:
state_before: l m r : List Char
p : Char → Bool
⊢ ValidFor l (List.takeWhile p m) (List.dropWhile p m ++ r)
    ({ str := { data := l ++ m ++ r }, startPos := { byteIdx := utf8Len l },
          stopPos := { byteIdx := utf8Len l + utf8Len m } }.takeWhile
      p)
state_after: l m r : List Char
p : Char → Bool
⊢ ValidFor l (List.takeWhile p m) (List.dropWhile p m ++ r)
    { str := { data := l ++ m ++ r }, startPos := { byteIdx := utf8Len l },
      stopPos := { byteIdx := utf8Len l + utf8Len (List.takeWhile p m) } }
tactic: simp only [Substring.takeWhile, takeWhileAux_of_valid]
state_before: l m r : List Char
p : Char → Bool
⊢ ValidFor l (List.takeWhile p m) (List.dropWhile p m ++ r)
    { str := { data := l ++ m ++ r }, startPos := { byteIdx := utf8Len l },
      stopPos := { byteIdx := utf8Len l + utf8Len (List.takeWhile p m) } }
state_after: case refine'_1
l m r : List Char
p : Char → Bool
⊢ m ++ r = List.takeWhile p m ++ (List.dropWhile p m ++ r)
tactic: refine' .of_eq .. <;> simp
state_before: case refine'_1
l m r : List Char
p : Char → Bool
⊢ m ++ r = List.takeWhile p m ++ (List.dropWhile p m ++ r)
state_after: no goals
tactic: rw [← List.append_assoc, List.takeWhile_append_dropWhile]
Theorem: OreLocalization.mul_one
File: Mathlib/RingTheory/OreLocalization/Basic.lean

Proof steps:
state_before: R : Type u_1
inst✝² : Monoid R
S : Submonoid R
inst✝¹ : OreSet S
X : Type ?u.89869
inst✝ : MulAction R X
x : OreLocalization S R
⊢ x * 1 = x
state_after: case c
R : Type u_1
inst✝² : Monoid R
S : Submonoid R
inst✝¹ : OreSet S
X : Type ?u.89869
inst✝ : MulAction R X
r : R
s : ↥S
⊢ r /ₒ s * 1 = r /ₒ s
tactic: induction' x with r s
state_before: case c
R : Type u_1
inst✝² : Monoid R
S : Submonoid R
inst✝¹ : OreSet S
X : Type ?u.89869
inst✝ : MulAction R X
r : R
s : ↥S
⊢ r /ₒ s * 1 = r /ₒ s
state_after: no goals
tactic: simp [OreLocalization.one_def, oreDiv_mul_char r (1 : R) s (1 : S) r 1 (by simp)]
Theorem: Equiv.Perm.cycleFactorsFinset_eq_empty_iff
File: Mathlib/GroupTheory/Perm/Cycle/Factors.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ f : Perm α
⊢ f.cycleFactorsFinset = ∅ ↔ f = 1
state_after: no goals
tactic: simpa [cycleFactorsFinset_eq_finset] using eq_comm
Theorem: Homeomorph.comp_continuousAt_iff'
File: Mathlib/Topology/Homeomorph.lean

Proof steps:
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝⁴ : TopologicalSpace X
inst✝³ : TopologicalSpace Y
inst✝² : TopologicalSpace Z
X' : Type u_4
Y' : Type u_5
inst✝¹ : TopologicalSpace X'
inst✝ : TopologicalSpace Y'
h : X ≃ₜ Y
f : Y → Z
x : X
⊢ range ⇑h ∈ 𝓝 (h x)
state_after: no goals
tactic: simp
Theorem: CategoryTheory.Prod.braiding_functor_map
File: Mathlib/CategoryTheory/Products/Basic.lean

Proof steps:
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
X : C × D
⊢ (𝟭 (C × D)).obj X = (swap C D ⋙ swap D C).obj X
state_after: no goals
tactic: simp
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
X : D × C
⊢ (swap D C ⋙ swap C D).obj X = (𝟭 (D × C)).obj X
state_after: no goals
tactic: simp
Theorem: ProbabilityTheory.exp_neg_integrableOn_Ioc
File: Mathlib/Probability/Distributions/Exponential.lean

Proof steps:
state_before: b x : ℝ
hb : 0 < b
⊢ IntegrableOn (fun x => rexp (-(b * x))) (Ioc 0 x) ℙ
state_after: b x : ℝ
hb : 0 < b
⊢ IntegrableOn (fun x => rexp (-b * x)) (Ioc 0 x) ℙ
tactic: simp only [neg_mul_eq_neg_mul]
state_before: b x : ℝ
hb : 0 < b
⊢ IntegrableOn (fun x => rexp (-b * x)) (Ioc 0 x) ℙ
state_after: no goals
tactic: exact (exp_neg_integrableOn_Ioi _ hb).mono_set Ioc_subset_Ioi_self
Theorem: CategoryTheory.Functor.comp_id
File: Mathlib/CategoryTheory/Functor/Basic.lean

Proof steps:
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
E : Type u₃
inst✝ : Category.{v₃, u₃} E
F : C ⥤ D
⊢ F ⋙ 𝟭 D = F
state_after: case mk
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
E : Type u₃
inst✝ : Category.{v₃, u₃} E
toPrefunctor✝ : C ⥤q D
map_id✝ : ∀ (X : C), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)
map_comp✝ : ∀ {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g
⊢ { toPrefunctor := toPrefunctor✝, map_id := map_id✝, map_comp := map_comp✝ } ⋙ 𝟭 D =
    { toPrefunctor := toPrefunctor✝, map_id := map_id✝, map_comp := map_comp✝ }
tactic: cases F
state_before: case mk
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
E : Type u₃
inst✝ : Category.{v₃, u₃} E
toPrefunctor✝ : C ⥤q D
map_id✝ : ∀ (X : C), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)
map_comp✝ : ∀ {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g
⊢ { toPrefunctor := toPrefunctor✝, map_id := map_id✝, map_comp := map_comp✝ } ⋙ 𝟭 D =
    { toPrefunctor := toPrefunctor✝, map_id := map_id✝, map_comp := map_comp✝ }
state_after: no goals
tactic: rfl
Theorem: Bipointed.Hom.comp_toFun
File: Mathlib/CategoryTheory/Category/Bipointed.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
X Y Z : Bipointed
f : X.Hom Y
g : Y.Hom Z
⊢ (g.toFun ∘ f.toFun) X.toProd.1 = Z.toProd.1
state_after: no goals
tactic: rw [Function.comp_apply, f.map_fst, g.map_fst]
state_before: α : Type u_1
β : Type u_2
X Y Z : Bipointed
f : X.Hom Y
g : Y.Hom Z
⊢ (g.toFun ∘ f.toFun) X.toProd.2 = Z.toProd.2
state_after: no goals
tactic: rw [Function.comp_apply, f.map_snd, g.map_snd]
Theorem: Set.einfsep_pair
File: Mathlib/Topology/MetricSpace/Infsep.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : PseudoEMetricSpace α
x y z : α
s t : Set α
hxy : x ≠ y
⊢ {x, y}.einfsep = edist x y
state_after: α : Type u_1
β : Type u_2
inst✝ : PseudoEMetricSpace α
x y z : α
s t : Set α
hxy : x ≠ y
⊢ {x, y}.einfsep = min (edist x y) (edist x y)
tactic: nth_rw 1 [← min_self (edist x y)]
state_before: α : Type u_1
β : Type u_2
inst✝ : PseudoEMetricSpace α
x y z : α
s t : Set α
hxy : x ≠ y
⊢ {x, y}.einfsep = min (edist x y) (edist x y)
state_after: case h.e'_3.h.e'_2
α : Type u_1
β : Type u_2
inst✝ : PseudoEMetricSpace α
x y z : α
s t : Set α
hxy : x ≠ y
⊢ edist x y = edist y x
tactic: convert einfsep_pair_eq_inf hxy using 2
state_before: case h.e'_3.h.e'_2
α : Type u_1
β : Type u_2
inst✝ : PseudoEMetricSpace α
x y z : α
s t : Set α
hxy : x ≠ y
⊢ edist x y = edist y x
state_after: no goals
tactic: rw [edist_comm]
Theorem: orthonormal_sUnion_of_directed
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : _root_.RCLike 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
ι : Type u_4
s : Set (Set E)
hs : DirectedOn (fun x x_1 => x ⊆ x_1) s
h : ∀ a ∈ s, Orthonormal 𝕜 fun x => ↑x
⊢ Orthonormal 𝕜 fun x => ↑x
state_after: no goals
tactic: exact orthonormal_iUnion_of_directed hs.directed_val (by simpa using h)
Theorem: HasFiniteFPowerSeriesAt.sub
File: Mathlib/Analysis/Analytic/CPolynomial.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f g : E → F
p pf pg : FormalMultilinearSeries 𝕜 E F
x : E
r r' : ℝ≥0∞
n m : ℕ
hf : HasFiniteFPowerSeriesAt f pf x n
hg : HasFiniteFPowerSeriesAt g pg x m
⊢ HasFiniteFPowerSeriesAt (f - g) (pf - pg) x (max n m)
state_after: no goals
tactic: simpa only [sub_eq_add_neg] using hf.add hg.neg
Theorem: Real.exists_nat_abs_mul_sub_round_le
File: Mathlib/NumberTheory/DiophantineApproximation.lean

Proof steps:
state_before: ξ : ℝ
n : ℕ
n_pos : 0 < n
⊢ ∃ k, 0 < k ∧ k ≤ n ∧ |↑k * ξ - ↑(round (↑k * ξ))| ≤ 1 / (↑n + 1)
state_after: case intro.intro.intro.intro
ξ : ℝ
n : ℕ
n_pos : 0 < n
j k : ℤ
hk₀ : 0 < k
hk₁ : k ≤ ↑n
h : |↑k * ξ - ↑j| ≤ 1 / (↑n + 1)
⊢ ∃ k, 0 < k ∧ k ≤ n ∧ |↑k * ξ - ↑(round (↑k * ξ))| ≤ 1 / (↑n + 1)
tactic: obtain ⟨j, k, hk₀, hk₁, h⟩ := exists_int_int_abs_mul_sub_le ξ n_pos
state_before: case intro.intro.intro.intro
ξ : ℝ
n : ℕ
n_pos : 0 < n
j k : ℤ
hk₀ : 0 < k
hk₁ : k ≤ ↑n
h : |↑k * ξ - ↑j| ≤ 1 / (↑n + 1)
⊢ ∃ k, 0 < k ∧ k ≤ n ∧ |↑k * ξ - ↑(round (↑k * ξ))| ≤ 1 / (↑n + 1)
state_after: case intro.intro.intro.intro
ξ : ℝ
n : ℕ
n_pos : 0 < n
j k : ℤ
hk₀ : 0 < k
hk₁ : k ≤ ↑n
h : |↑k * ξ - ↑j| ≤ 1 / (↑n + 1)
hk : ↑k.toNat = k
⊢ ∃ k, 0 < k ∧ k ≤ n ∧ |↑k * ξ - ↑(round (↑k * ξ))| ≤ 1 / (↑n + 1)
tactic: have hk := toNat_of_nonneg hk₀.le
state_before: case intro.intro.intro.intro
ξ : ℝ
n : ℕ
n_pos : 0 < n
j k : ℤ
hk₀ : 0 < k
hk₁ : k ≤ ↑n
h : |↑k * ξ - ↑j| ≤ 1 / (↑n + 1)
hk : ↑k.toNat = k
⊢ ∃ k, 0 < k ∧ k ≤ n ∧ |↑k * ξ - ↑(round (↑k * ξ))| ≤ 1 / (↑n + 1)
state_after: case intro.intro.intro.intro
ξ : ℝ
n : ℕ
n_pos : 0 < n
j k : ℤ
hk₀ : 0 < ↑k.toNat
hk₁ : ↑k.toNat ≤ ↑n
h : |↑↑k.toNat * ξ - ↑j| ≤ 1 / (↑n + 1)
hk : ↑k.toNat = k
⊢ ∃ k, 0 < k ∧ k ≤ n ∧ |↑k * ξ - ↑(round (↑k * ξ))| ≤ 1 / (↑n + 1)
tactic: rw [← hk] at hk₀ hk₁ h
state_before: case intro.intro.intro.intro
ξ : ℝ
n : ℕ
n_pos : 0 < n
j k : ℤ
hk₀ : 0 < ↑k.toNat
hk₁ : ↑k.toNat ≤ ↑n
h : |↑↑k.toNat * ξ - ↑j| ≤ 1 / (↑n + 1)
hk : ↑k.toNat = k
⊢ ∃ k, 0 < k ∧ k ≤ n ∧ |↑k * ξ - ↑(round (↑k * ξ))| ≤ 1 / (↑n + 1)
state_after: no goals
tactic: exact ⟨k.toNat, natCast_pos.mp hk₀, Nat.cast_le.mp hk₁, (round_le (↑k.toNat * ξ) j).trans h⟩
Theorem: Finset.prod_sdiff_eq_prod_sdiff_iff
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

Proof steps:
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝¹ : DecidableEq ι
inst✝ : CancelCommMonoid α
s t : Finset ι
f : ι → α
⊢ (∏ i ∈ t \ s, f i) * ∏ i ∈ s, f i = (∏ i ∈ s \ t, f i) * ∏ i ∈ t, f i
state_after: no goals
tactic: rw [← prod_union disjoint_sdiff_self_left, ← prod_union disjoint_sdiff_self_left,
      sdiff_union_self_eq_union, sdiff_union_self_eq_union, union_comm]
Theorem: OneHom.cancel_left
File: Mathlib/Algebra/Group/Hom/Defs.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
G : Type u_7
H : Type u_8
F : Type u_9
inst✝² : One M
inst✝¹ : One N
inst✝ : One P
g : OneHom N P
f₁ f₂ : OneHom M N
hg : Function.Injective ⇑g
h : g.comp f₁ = g.comp f₂
x : M
⊢ g (f₁ x) = g (f₂ x)
state_after: no goals
tactic: rw [← OneHom.comp_apply, h, OneHom.comp_apply]
Theorem: Complex.cpow_inv_two_im_eq_neg_sqrt
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

Proof steps:
state_before: x : ℂ
hx : x.im < 0
⊢ (x ^ 2⁻¹).im = -√((abs x - x.re) / 2)
state_after: case hl
x : ℂ
hx : x.im < 0
⊢ -(2 * π) ≤ x.arg

case hr
x : ℂ
hx : x.im < 0
⊢ x.arg ≤ 0
tactic: rw [← ofReal_ofNat, ← ofReal_inv, cpow_ofReal_im, ← div_eq_mul_inv, ← one_div,
    ← Real.sqrt_eq_rpow, sin_half_eq_neg_sqrt, mul_neg, ← sqrt_mul (abs.nonneg _),
    ← mul_div_assoc, mul_sub, mul_one, abs_mul_cos_arg]
Theorem: WithTop.mul_coe_eq_bind
File: Mathlib/Algebra/Order/Ring/WithTop.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
a b✝ : WithTop α
b : α
hb : b ≠ 0
⊢ ⊤ * ↑b = Option.bind ⊤ fun a => Option.some (a * b)
state_after: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
a b✝ : WithTop α
b : α
hb : b ≠ 0
⊢ ⊤ = Option.bind ⊤ fun a => Option.some (a * b)
tactic: simp [top_mul, hb]
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
a b✝ : WithTop α
b : α
hb : b ≠ 0
⊢ ⊤ = Option.bind ⊤ fun a => Option.some (a * b)
state_after: no goals
tactic: rfl
Theorem: Algebra.trace_comp_trace_of_basis
File: Mathlib/RingTheory/Trace/Defs.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
T : Type u_3
inst✝⁹ : CommRing R
inst✝⁸ : CommRing S
inst✝⁷ : CommRing T
inst✝⁶ : Algebra R S
inst✝⁵ : Algebra R T
ι✝ κ✝ : Type w
inst✝⁴ : Fintype ι✝
b✝ : Basis ι✝ R S
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
ι : Type u_4
κ : Type u_5
inst✝¹ : Finite ι
inst✝ : Finite κ
b : Basis ι R S
c : Basis κ S T
⊢ trace R S ∘ₗ ↑R (trace S T) = trace R T
state_after: case h
R : Type u_1
S : Type u_2
T : Type u_3
inst✝⁹ : CommRing R
inst✝⁸ : CommRing S
inst✝⁷ : CommRing T
inst✝⁶ : Algebra R S
inst✝⁵ : Algebra R T
ι✝ κ✝ : Type w
inst✝⁴ : Fintype ι✝
b✝ : Basis ι✝ R S
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
ι : Type u_4
κ : Type u_5
inst✝¹ : Finite ι
inst✝ : Finite κ
b : Basis ι R S
c : Basis κ S T
x✝ : T
⊢ (trace R S ∘ₗ ↑R (trace S T)) x✝ = (trace R T) x✝
tactic: ext
state_before: case h
R : Type u_1
S : Type u_2
T : Type u_3
inst✝⁹ : CommRing R
inst✝⁸ : CommRing S
inst✝⁷ : CommRing T
inst✝⁶ : Algebra R S
inst✝⁵ : Algebra R T
ι✝ κ✝ : Type w
inst✝⁴ : Fintype ι✝
b✝ : Basis ι✝ R S
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
ι : Type u_4
κ : Type u_5
inst✝¹ : Finite ι
inst✝ : Finite κ
b : Basis ι R S
c : Basis κ S T
x✝ : T
⊢ (trace R S ∘ₗ ↑R (trace S T)) x✝ = (trace R T) x✝
state_after: no goals
tactic: rw [LinearMap.comp_apply, LinearMap.restrictScalars_apply, trace_trace_of_basis b c]
Theorem: Polynomial.cyclotomic_zero
File: Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean

Proof steps:
state_before: R : Type u_1
inst✝ : Ring R
⊢ cyclotomic 0 R = 1
state_after: no goals
tactic: simp only [cyclotomic, dif_pos]
Theorem: Nat.preimage_Icc
File: Mathlib/Algebra/Order/Floor.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a✝ : α
n : ℕ
a b : α
hb : 0 ≤ b
⊢ Nat.cast ⁻¹' Icc a b = Icc ⌈a⌉₊ ⌊b⌋₊
state_after: case h
F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a✝ : α
n : ℕ
a b : α
hb : 0 ≤ b
x✝ : ℕ
⊢ x✝ ∈ Nat.cast ⁻¹' Icc a b ↔ x✝ ∈ Icc ⌈a⌉₊ ⌊b⌋₊
tactic: ext
state_before: case h
F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a✝ : α
n : ℕ
a b : α
hb : 0 ≤ b
x✝ : ℕ
⊢ x✝ ∈ Nat.cast ⁻¹' Icc a b ↔ x✝ ∈ Icc ⌈a⌉₊ ⌊b⌋₊
state_after: no goals
tactic: simp [ceil_le, hb, le_floor_iff]
Theorem: Fin.snoc_comp_cast_add
File: Mathlib/Data/Fin/Tuple/Basic.lean

Proof steps:
state_before: m✝ n✝ : ℕ
α✝ : Fin (n✝ + 1) → Type u
x : α✝ (last n✝)
q : (i : Fin (n✝ + 1)) → α✝ i
p : (i : Fin n✝) → α✝ i.castSucc
i : Fin n✝
y : α✝ i.castSucc
z : α✝ (last n✝)
n m : ℕ
α : Type u_1
f : Fin (n + m) → α
a : α
⊢ ∀ (x : Fin n), (snoc f a ∘ castAdd (m + 1)) x = (f ∘ castAdd m) x
state_after: m✝ n✝ : ℕ
α✝ : Fin (n✝ + 1) → Type u
x : α✝ (last n✝)
q : (i : Fin (n✝ + 1)) → α✝ i
p : (i : Fin n✝) → α✝ i.castSucc
i : Fin n✝
y : α✝ i.castSucc
z : α✝ (last n✝)
n m : ℕ
α : Type u_1
f : Fin (n + m) → α
a : α
⊢ ∀ (x : Fin n), snoc f a (castAdd (m + 1) x) = f (castAdd m x)
tactic: unfold comp
state_before: m✝ n✝ : ℕ
α✝ : Fin (n✝ + 1) → Type u
x : α✝ (last n✝)
q : (i : Fin (n✝ + 1)) → α✝ i
p : (i : Fin n✝) → α✝ i.castSucc
i : Fin n✝
y : α✝ i.castSucc
z : α✝ (last n✝)
n m : ℕ
α : Type u_1
f : Fin (n + m) → α
a : α
⊢ ∀ (x : Fin n), snoc f a (castAdd (m + 1) x) = f (castAdd m x)
state_after: no goals
tactic: exact snoc_cast_add _ _
Theorem: CategoryTheory.GradedObject.Monoidal.tensor_id
File: Mathlib/CategoryTheory/GradedObject/Monoidal.lean

Proof steps:
state_before: I : Type u
inst✝³ : AddMonoid I
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : MonoidalCategory C
X Y : GradedObject I C
inst✝ : X.HasTensor Y
⊢ tensorHom (𝟙 X) (𝟙 Y) = 𝟙 (tensorObj X Y)
state_after: I : Type u
inst✝³ : AddMonoid I
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : MonoidalCategory C
X Y : GradedObject I C
inst✝ : X.HasTensor Y
⊢ (mapMap
      (((mapBifunctor (curriedTensor C) I I).map (𝟙 X)).app Y ≫ ((mapBifunctor (curriedTensor C) I I).obj X).map (𝟙 Y))
      fun x => x.1 + x.2) =
    𝟙 (tensorObj X Y)
tactic: dsimp [tensorHom, mapBifunctorMapMap]
state_before: I : Type u
inst✝³ : AddMonoid I
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : MonoidalCategory C
X Y : GradedObject I C
inst✝ : X.HasTensor Y
⊢ (mapMap
      (((mapBifunctor (curriedTensor C) I I).map (𝟙 X)).app Y ≫ ((mapBifunctor (curriedTensor C) I I).obj X).map (𝟙 Y))
      fun x => x.1 + x.2) =
    𝟙 (tensorObj X Y)
state_after: I : Type u
inst✝³ : AddMonoid I
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : MonoidalCategory C
X Y : GradedObject I C
inst✝ : X.HasTensor Y
⊢ 𝟙 ((((mapBifunctor (curriedTensor C) I I).obj X).obj Y).mapObj fun x => x.1 + x.2) = 𝟙 (tensorObj X Y)
tactic: simp only [Functor.map_id, NatTrans.id_app, comp_id, mapMap_id]
state_before: I : Type u
inst✝³ : AddMonoid I
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : MonoidalCategory C
X Y : GradedObject I C
inst✝ : X.HasTensor Y
⊢ 𝟙 ((((mapBifunctor (curriedTensor C) I I).obj X).obj Y).mapObj fun x => x.1 + x.2) = 𝟙 (tensorObj X Y)
state_after: no goals
tactic: rfl
Theorem: Fin.foldr_eq_foldr_list
File: .lake/packages/batteries/Batteries/Data/Fin/Lemmas.lean

Proof steps:
state_before: n : Nat
α : Type u_1
f : Fin n → α → α
x : α
⊢ foldr n f x = List.foldr f x (list n)
state_after: no goals
tactic: induction n with
  | zero => rw [foldr_zero, list_zero, List.foldr_nil]
  | succ n ih => rw [foldr_succ, ih, list_succ, List.foldr_cons, List.foldr_map]
Theorem: sdiff_sdiff_left'
File: Mathlib/Order/BooleanAlgebra.lean

Proof steps:
state_before: α : Type u
β : Type u_1
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
⊢ (x \ y) \ z = x \ y ⊓ x \ z
state_after: no goals
tactic: rw [sdiff_sdiff_left, sdiff_sup]
Theorem: CategoryTheory.Limits.inv_prodComparison_map_fst
File: Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean

Proof steps:
state_before: C : Type u
inst✝⁹ : Category.{v, u} C
X Y : C
D : Type u₂
inst✝⁸ : Category.{w, u₂} D
E : Type u₃
inst✝⁷ : Category.{w', u₃} E
F : C ⥤ D
G : D ⥤ E
A A' B B' : C
inst✝⁶ : HasBinaryProduct A B
inst✝⁵ : HasBinaryProduct A' B'
inst✝⁴ : HasBinaryProduct (F.obj A) (F.obj B)
inst✝³ : HasBinaryProduct (F.obj A') (F.obj B')
inst✝² : HasBinaryProduct (G.obj (F.obj A)) (G.obj (F.obj B))
inst✝¹ : HasBinaryProduct ((F ⋙ G).obj A) ((F ⋙ G).obj B)
inst✝ : IsIso (prodComparison F A B)
⊢ inv (prodComparison F A B) ≫ F.map prod.fst = prod.fst
state_after: no goals
tactic: simp [IsIso.inv_comp_eq]
Theorem: finProdFinEquiv_symm_apply
File: Mathlib/Logic/Equiv/Fin.lean

Proof steps:
state_before: m n : ℕ
x : Fin m × Fin n
⊢ ↑x.2 + n * ↑x.1 + 1 = ↑x.1 * n + ↑x.2 + 1
state_after: no goals
tactic: ac_rfl
state_before: m n : ℕ
x✝ : Fin m × Fin n
x : Fin m
y : Fin n
H : 0 < n
⊢ ↑y / n + ↑x = 0 + ↑x
state_after: no goals
tactic: rw [Nat.div_eq_of_lt y.2]
Theorem: Equiv.Perm.mem_support_cycleOf_iff'
File: Mathlib/GroupTheory/Perm/Cycle/Factors.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
f g : Perm α
x y : α
inst✝³ : DecidableRel f.SameCycle
inst✝² : DecidableRel g.SameCycle
hx : f x ≠ x
inst✝¹ : DecidableEq α
inst✝ : Fintype α
⊢ y ∈ (f.cycleOf x).support ↔ f.SameCycle x y
state_after: no goals
tactic: rw [mem_support_cycleOf_iff, and_iff_left (mem_support.2 hx)]