ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Polynomial.degree_pow'
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.leadingCoeff ^ 0 ≠ 0
⊢ (p ^ 0).degree = 0 • p.degree
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 : 1 ≠ 0
⊢ (C 1).degree = 0 • p.degree
tactic: rw [pow_zero, ← C_1] at *
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 : 1 ≠ 0
⊢ (C 1).degree = 0 • p.degree
state_after: no goals
tactic: rw [degree_C h, zero_nsmul]
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
n : ℕ
h : p.leadingCoeff ^ (n + 1) ≠ 0
⊢ (p ^ (n + 1)).degree = (n + 1) • p.degree
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
n : ℕ
h : p.leadingCoeff ^ (n + 1) ≠ 0
h₁ : p.leadingCoeff ^ n ≠ 0
⊢ (p ^ (n + 1)).degree = (n + 1) • p.degree
tactic: have h₁ : leadingCoeff p ^ n ≠ 0 := fun h₁ => h <| by rw [pow_succ, h₁, zero_mul]
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
n : ℕ
h : p.leadingCoeff ^ (n + 1) ≠ 0
h₁ : p.leadingCoeff ^ n ≠ 0
⊢ (p ^ (n + 1)).degree = (n + 1) • p.degree
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
n : ℕ
h : p.leadingCoeff ^ (n + 1) ≠ 0
h₁ : p.leadingCoeff ^ n ≠ 0
h₂ : (p ^ n).leadingCoeff * p.leadingCoeff ≠ 0
⊢ (p ^ (n + 1)).degree = (n + 1) • p.degree
tactic: have h₂ : leadingCoeff (p ^ n) * leadingCoeff p ≠ 0 := by
      rwa [pow_succ, ← leadingCoeff_pow' h₁] at h
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
n : ℕ
h : p.leadingCoeff ^ (n + 1) ≠ 0
h₁ : p.leadingCoeff ^ n ≠ 0
h₂ : (p ^ n).leadingCoeff * p.leadingCoeff ≠ 0
⊢ (p ^ (n + 1)).degree = (n + 1) • p.degree
state_after: no goals
tactic: rw [pow_succ, degree_mul' h₂, succ_nsmul, degree_pow' h₁]
Theorem: Mathlib.Meta.NormNum.isInt_eq_false
File: Mathlib/Tactic/NormNum/Eq.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : Ring α
inst✝ : CharZero α
n✝¹ n✝ : ℤ
h : decide (n✝¹ = n✝) = false
⊢ ¬↑n✝¹ = ↑n✝
state_after: no goals
tactic: simpa using of_decide_eq_false h
Theorem: CategoryTheory.IsPushout.of_iso
File: Mathlib/CategoryTheory/Limits/Shapes/Pullback/CommSq.lean

Proof steps:
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
Z X Y P : C
f : Z ⟶ X
g : Z ⟶ Y
inl : X ⟶ P
inr : Y ⟶ P
h : IsPushout f g inl inr
Z' X' Y' P' : C
f' : Z' ⟶ X'
g' : Z' ⟶ Y'
inl' : X' ⟶ P'
inr' : Y' ⟶ P'
e₁ : Z ≅ Z'
e₂ : X ≅ X'
e₃ : Y ≅ Y'
e₄ : P ≅ P'
commf : f ≫ e₂.hom = e₁.hom ≫ f'
commg : g ≫ e₃.hom = e₁.hom ≫ g'
comminl : inl ≫ e₄.hom = e₂.hom ≫ inl'
comminr : inr ≫ e₄.hom = e₃.hom ≫ inr'
⊢ f' ≫ inl' = g' ≫ inr'
state_after: no goals
tactic: rw [← cancel_epi e₁.hom, ← reassoc_of% commf, ← comminl,
      ← reassoc_of% commg, ← comminr, h.w_assoc]
Theorem: CategoryTheory.Limits.Bicone.toBinaryBiconeFunctor_obj_inr
File: Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean

Proof steps:
state_before: J : Type w
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
D : Type uD
inst✝¹ : Category.{uD', uD} D
inst✝ : HasZeroMorphisms D
X Y : C
b : Bicone (pairFunction X Y)
⊢ b.ι WalkingPair.left ≫ b.π WalkingPair.left = 𝟙 X
state_after: no goals
tactic: simp [Bicone.ι_π]
state_before: J : Type w
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
D : Type uD
inst✝¹ : Category.{uD', uD} D
inst✝ : HasZeroMorphisms D
X Y : C
b : Bicone (pairFunction X Y)
⊢ b.ι WalkingPair.right ≫ b.π WalkingPair.left = 0
state_after: no goals
tactic: simp [Bicone.ι_π]
state_before: J : Type w
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
D : Type uD
inst✝¹ : Category.{uD', uD} D
inst✝ : HasZeroMorphisms D
X Y : C
b : Bicone (pairFunction X Y)
⊢ b.ι WalkingPair.left ≫ b.π WalkingPair.right = 0
state_after: no goals
tactic: simp [Bicone.ι_π]
state_before: J : Type w
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
D : Type uD
inst✝¹ : Category.{uD', uD} D
inst✝ : HasZeroMorphisms D
X Y : C
b : Bicone (pairFunction X Y)
⊢ b.ι WalkingPair.right ≫ b.π WalkingPair.right = 𝟙 Y
state_after: no goals
tactic: simp [Bicone.ι_π]
Theorem: Set.Finite.infsep
File: Mathlib/Topology/MetricSpace/Infsep.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : PseudoMetricSpace α
x y z : α
s t : Set α
inst✝ : Decidable s.Nontrivial
hsf : s.Finite
hs : s.Nontrivial
⊢ ⋯.toFinset.Nonempty
state_after: no goals
tactic: simpa
state_before: α : Type u_1
β : Type u_2
inst✝¹ : PseudoMetricSpace α
x y z : α
s t : Set α
inst✝ : Decidable s.Nontrivial
hsf : s.Finite
⊢ s.infsep = if hs : s.Nontrivial then ⋯.toFinset.inf' ⋯ (uncurry dist) else 0
state_after: case pos
α : Type u_1
β : Type u_2
inst✝¹ : PseudoMetricSpace α
x y z : α
s t : Set α
inst✝ : Decidable s.Nontrivial
hsf : s.Finite
hs : s.Nontrivial
⊢ s.infsep = ⋯.toFinset.inf' ⋯ (uncurry dist)

case neg
α : Type u_1
β : Type u_2
inst✝¹ : PseudoMetricSpace α
x y z : α
s t : Set α
inst✝ : Decidable s.Nontrivial
hsf : s.Finite
hs : ¬s.Nontrivial
⊢ s.infsep = 0
tactic: split_ifs with hs
Theorem: Orientation.abs_kahler
File: Mathlib/Analysis/InnerProductSpace/TwoDim.lean

Proof steps:
state_before: E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
x y : E
⊢ Complex.abs ((o.kahler x) y) = ‖x‖ * ‖y‖
state_after: E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
x y : E
⊢ Complex.normSq ((o.kahler x) y) = (‖x‖ * ‖y‖) ^ 2

case ha
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
x y : E
⊢ 0 ≤ Complex.abs ((o.kahler x) y)

case hb
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
x y : E
⊢ 0 ≤ ‖x‖ * ‖y‖
tactic: rw [← sq_eq_sq, Complex.sq_abs]
Theorem: mem_multiples_of_prime_card
File: Mathlib/GroupTheory/SpecificGroups/Cyclic.lean

Proof steps:
state_before: α : Type u
a : α
inst✝¹ : Group α
G : Type u_1
inst✝ : Group G
x✝ : Fintype G
p : ℕ
hp : Fact (Nat.Prime p)
h : Fintype.card G = p
g g' : G
hg : g ≠ 1
⊢ g' ∈ Submonoid.powers g
state_after: α : Type u
a : α
inst✝¹ : Group α
G : Type u_1
inst✝ : Group G
x✝ : Fintype G
p : ℕ
hp : Fact (Nat.Prime p)
h : Fintype.card G = p
g g' : G
hg : g ≠ 1
⊢ g' ∈ zpowers g
tactic: rw [mem_powers_iff_mem_zpowers]
state_before: α : Type u
a : α
inst✝¹ : Group α
G : Type u_1
inst✝ : Group G
x✝ : Fintype G
p : ℕ
hp : Fact (Nat.Prime p)
h : Fintype.card G = p
g g' : G
hg : g ≠ 1
⊢ g' ∈ zpowers g
state_after: no goals
tactic: exact mem_zpowers_of_prime_card h hg
Theorem: Filter.ZeroAtFilter.neg
File: Mathlib/Order/Filter/ZeroAndBoundedAtFilter.lean

Proof steps:
state_before: 𝕜 : Type u_1
α : Type u_2
β : Type u_3
inst✝² : TopologicalSpace β
inst✝¹ : AddGroup β
inst✝ : ContinuousNeg β
l : Filter α
f : α → β
hf : l.ZeroAtFilter f
⊢ l.ZeroAtFilter (-f)
state_after: no goals
tactic: simpa using hf.neg
Theorem: List.IsRotated.reverse
File: Mathlib/Data/List/Rotate.lean

Proof steps:
state_before: α : Type u
l l' : List α
h : l ~r l'
⊢ l.reverse ~r l'.reverse
state_after: case intro
α : Type u
l : List α
n : ℕ
⊢ l.reverse ~r (l.rotate n).reverse
tactic: obtain ⟨n, rfl⟩ := h
state_before: case intro
α : Type u
l : List α
n : ℕ
⊢ l.reverse ~r (l.rotate n).reverse
state_after: no goals
tactic: exact ⟨_, (reverse_rotate _ _).symm⟩
Theorem: Int.abs_negOnePow
File: Mathlib/Algebra/Ring/NegOnePow.lean

Proof steps:
state_before: n : ℤ
⊢ |↑n.negOnePow| = 1
state_after: no goals
tactic: rw [abs_eq_natAbs, Int.units_natAbs, Nat.cast_one]
Theorem: Matrix.UnitaryGroup.toGL_one
File: Mathlib/LinearAlgebra/UnitaryGroup.lean

Proof steps:
state_before: n : Type u
inst✝³ : DecidableEq n
inst✝² : Fintype n
α : Type v
inst✝¹ : CommRing α
inst✝ : StarRing α
A : Matrix n n α
⊢ ↑(toGL 1) = ↑1
state_after: n : Type u
inst✝³ : DecidableEq n
inst✝² : Fintype n
α : Type v
inst✝¹ : CommRing α
inst✝ : StarRing α
A : Matrix n n α
⊢ LinearMap.id = ↑1
tactic: simp only [coe_toGL, toLin'_one]
state_before: n : Type u
inst✝³ : DecidableEq n
inst✝² : Fintype n
α : Type v
inst✝¹ : CommRing α
inst✝ : StarRing α
A : Matrix n n α
⊢ LinearMap.id = ↑1
state_after: no goals
tactic: rfl
Theorem: lt_mul_of_one_lt_right
File: Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean

Proof steps:
state_before: α : Type u_1
a b c d : α
inst✝³ : MulOneClass α
inst✝² : Zero α
inst✝¹ : Preorder α
inst✝ : PosMulStrictMono α
ha : 0 < a
h : 1 < b
⊢ a < a * b
state_after: no goals
tactic: simpa only [mul_one] using mul_lt_mul_of_pos_left h ha
Theorem: continuous_zsmul
File: Mathlib/Topology/Algebra/Group/Basic.lean

Proof steps:
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s : Set α
x : α
n : ℕ
⊢ Continuous fun a => a ^ Int.ofNat n
state_after: no goals
tactic: simpa using continuous_pow n
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s : Set α
x : α
n : ℕ
⊢ Continuous fun a => a ^ Int.negSucc n
state_after: no goals
tactic: simpa using (continuous_pow (n + 1)).inv
Theorem: nhds_induced
File: Mathlib/Topology/Order.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type u_1
f✝ : α → β
ι : Sort u_2
T : TopologicalSpace α
f : β → α
a : β
⊢ 𝓝 a = comap f (𝓝 (f a))
state_after: case h
α : Type u
β : Type v
γ : Type u_1
f✝ : α → β
ι : Sort u_2
T : TopologicalSpace α
f : β → α
a : β
s : Set β
⊢ s ∈ 𝓝 a ↔ s ∈ comap f (𝓝 (f a))
tactic: ext s
state_before: case h
α : Type u
β : Type v
γ : Type u_1
f✝ : α → β
ι : Sort u_2
T : TopologicalSpace α
f : β → α
a : β
s : Set β
⊢ s ∈ 𝓝 a ↔ s ∈ comap f (𝓝 (f a))
state_after: no goals
tactic: rw [mem_nhds_induced, mem_comap]
Theorem: inner_zero_right
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
x : E
⊢ ⟪x, 0⟫_𝕜 = 0
state_after: no goals
tactic: rw [← inner_conj_symm, inner_zero_left, RingHom.map_zero]
Theorem: Fin.cycleRange_of_lt
File: Mathlib/GroupTheory/Perm/Fin.lean

Proof steps:
state_before: n : ℕ
i j : Fin n.succ
h : j < i
⊢ i.cycleRange j = j + 1
state_after: no goals
tactic: rw [cycleRange_of_le h.le, if_neg h.ne]
Theorem: Nat.WithBot.add_eq_three_iff
File: Mathlib/Data/Nat/WithBot.lean

Proof steps:
state_before: n m : WithBot ℕ
⊢ n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0
state_after: case bot
m : WithBot ℕ
⊢ ⊥ + m = 3 ↔ ⊥ = 0 ∧ m = 3 ∨ ⊥ = 1 ∧ m = 2 ∨ ⊥ = 2 ∧ m = 1 ∨ ⊥ = 3 ∧ m = 0

case coe
m : WithBot ℕ
a✝ : ℕ
⊢ ↑a✝ + m = 3 ↔ ↑a✝ = 0 ∧ m = 3 ∨ ↑a✝ = 1 ∧ m = 2 ∨ ↑a✝ = 2 ∧ m = 1 ∨ ↑a✝ = 3 ∧ m = 0
tactic: cases n
state_before: case coe
m : WithBot ℕ
a✝ : ℕ
⊢ ↑a✝ + m = 3 ↔ ↑a✝ = 0 ∧ m = 3 ∨ ↑a✝ = 1 ∧ m = 2 ∨ ↑a✝ = 2 ∧ m = 1 ∨ ↑a✝ = 3 ∧ m = 0
state_after: case coe.bot
a✝ : ℕ
⊢ ↑a✝ + ⊥ = 3 ↔ ↑a✝ = 0 ∧ ⊥ = 3 ∨ ↑a✝ = 1 ∧ ⊥ = 2 ∨ ↑a✝ = 2 ∧ ⊥ = 1 ∨ ↑a✝ = 3 ∧ ⊥ = 0

case coe.coe
a✝¹ a✝ : ℕ
⊢ ↑a✝¹ + ↑a✝ = 3 ↔ ↑a✝¹ = 0 ∧ ↑a✝ = 3 ∨ ↑a✝¹ = 1 ∧ ↑a✝ = 2 ∨ ↑a✝¹ = 2 ∧ ↑a✝ = 1 ∨ ↑a✝¹ = 3 ∧ ↑a✝ = 0
tactic: cases m
state_before: case coe.coe
a✝¹ a✝ : ℕ
⊢ ↑a✝¹ + ↑a✝ = 3 ↔ ↑a✝¹ = 0 ∧ ↑a✝ = 3 ∨ ↑a✝¹ = 1 ∧ ↑a✝ = 2 ∨ ↑a✝¹ = 2 ∧ ↑a✝ = 1 ∨ ↑a✝¹ = 3 ∧ ↑a✝ = 0
state_after: no goals
tactic: simp [← WithBot.coe_add, Nat.add_eq_three_iff]
Theorem: Set.neg_mem_center
File: Mathlib/Algebra/Ring/Center.lean

Proof steps:
state_before: M : Type u_1
inst✝ : NonUnitalNonAssocRing M
a : M
ha : a ∈ center M
x✝ : M
⊢ -a * x✝ = x✝ * -a
state_after: no goals
tactic: rw [← neg_mul_comm, ← ha.comm, neg_mul_comm]
state_before: M : Type u_1
inst✝ : NonUnitalNonAssocRing M
a : M
ha : a ∈ center M
x✝¹ x✝ : M
⊢ -a * (x✝¹ * x✝) = -a * x✝¹ * x✝
state_after: no goals
tactic: rw [neg_mul, ha.left_assoc, neg_mul, neg_mul]
state_before: M : Type u_1
inst✝ : NonUnitalNonAssocRing M
a : M
ha : a ∈ center M
x✝¹ x✝ : M
⊢ x✝¹ * -a * x✝ = x✝¹ * (-a * x✝)
state_after: no goals
tactic: rw [← neg_mul_comm, ha.mid_assoc, neg_mul_comm, neg_mul]
state_before: M : Type u_1
inst✝ : NonUnitalNonAssocRing M
a : M
ha : a ∈ center M
x✝¹ x✝ : M
⊢ x✝¹ * x✝ * -a = x✝¹ * (x✝ * -a)
state_after: no goals
tactic: rw [mul_neg, ha.right_assoc, mul_neg, mul_neg]
Theorem: Finset.product_eq_univ
File: Mathlib/Data/Fintype/Prod.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : Fintype α
inst✝² : Fintype β
s : Finset α
t : Finset β
inst✝¹ : Nonempty α
inst✝ : Nonempty β
⊢ s ×ˢ t = univ ↔ s = univ ∧ t = univ
state_after: no goals
tactic: simp [eq_univ_iff_forall, forall_and]
Theorem: Cardinal.toNat_eq_iff
File: Mathlib/SetTheory/Cardinal/ToNat.lean

Proof steps:
state_before: α : Type u
c d : Cardinal.{u}
n : ℕ
hn : n ≠ 0
⊢ toNat c = n ↔ c = ↑n
state_after: no goals
tactic: rw [← toNat_toENat, ENat.toNat_eq_iff hn, toENat_eq_nat]
Theorem: AddMonoidHom.restrict_range
File: Mathlib/Algebra/Group/Subgroup/Basic.lean

Proof steps:
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁵ : Group G
inst✝⁴ : Group G'
inst✝³ : Group G''
A : Type u_4
inst✝² : AddGroup A
N : Type u_5
P : Type u_6
inst✝¹ : Group N
inst✝ : Group P
K : Subgroup G
f : G →* N
⊢ (f.restrict K).range = map f K
state_after: no goals
tactic: simp_rw [SetLike.ext_iff, mem_range, mem_map, restrict_apply, SetLike.exists,
    exists_prop, forall_const]
Theorem: Complex.normSq_add_mul_I
File: Mathlib/Data/Complex/Basic.lean

Proof steps:
state_before: x y : ℝ
⊢ normSq (↑x + ↑y * I) = x ^ 2 + y ^ 2
state_after: no goals
tactic: rw [← mk_eq_add_mul_I, normSq_mk, sq, sq]
Theorem: LipschitzWith.norm_le_mul'
File: Mathlib/Analysis/Normed/Group/Uniform.lean

Proof steps:
state_before: 𝓕 : Type u_1
α : Type u_2
E : Type u_3
F : Type u_4
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
s : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
inst✝ : FunLike 𝓕 E F
f : E → F
K : ℝ≥0
h : LipschitzWith K f
hf : f 1 = 1
x : E
⊢ ‖f x‖ ≤ ↑K * ‖x‖
state_after: no goals
tactic: simpa only [dist_one_right, hf] using h.dist_le_mul x 1
Theorem: Finset.sum_eq_zero_iff_of_nonneg
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✝¹ : CommMonoid M
inst✝ : OrderedCommMonoid N
f g : ι → N
s t : Finset ι
⊢ (∀ i ∈ s, 1 ≤ f i) → (∏ i ∈ s, f i = 1 ↔ ∀ i ∈ s, f i = 1)
state_after: no goals
tactic: classical
    refine Finset.induction_on s
      (fun _ ↦ ⟨fun _ _ h ↦ False.elim (Finset.not_mem_empty _ h), fun _ ↦ rfl⟩) ?_
    intro a s ha ih H
    have : ∀ i ∈ s, 1 ≤ f i := fun _ ↦ H _ ∘ mem_insert_of_mem
    rw [prod_insert ha, mul_eq_one_iff' (H _ <| mem_insert_self _ _) (one_le_prod' this),
      forall_mem_insert, ih this]
Theorem: LinearIndependent.cardinal_mk_le_finrank
File: Mathlib/LinearAlgebra/Dimension/Finite.lean

Proof steps:
state_before: R : Type u
M M₁ : Type v
M' : Type v'
ι✝ : Type w
inst✝⁸ : Ring R
inst✝⁷ : AddCommGroup M
inst✝⁶ : AddCommGroup M'
inst✝⁵ : AddCommGroup M₁
inst✝⁴ : Module R M
inst✝³ : Module R M'
inst✝² : Module R M₁
inst✝¹ : StrongRankCondition R
inst✝ : Module.Finite R M
ι : Type w
b : ι → M
h : LinearIndependent R b
⊢ #ι ≤ ↑(finrank R M)
state_after: R : Type u
M M₁ : Type v
M' : Type v'
ι✝ : Type w
inst✝⁸ : Ring R
inst✝⁷ : AddCommGroup M
inst✝⁶ : AddCommGroup M'
inst✝⁵ : AddCommGroup M₁
inst✝⁴ : Module R M
inst✝³ : Module R M'
inst✝² : Module R M₁
inst✝¹ : StrongRankCondition R
inst✝ : Module.Finite R M
ι : Type w
b : ι → M
h : LinearIndependent R b
⊢ lift.{max v w, w} #ι ≤ lift.{max v w, w} ↑(finrank R M)
tactic: rw [← lift_le.{max v w}]
state_before: R : Type u
M M₁ : Type v
M' : Type v'
ι✝ : Type w
inst✝⁸ : Ring R
inst✝⁷ : AddCommGroup M
inst✝⁶ : AddCommGroup M'
inst✝⁵ : AddCommGroup M₁
inst✝⁴ : Module R M
inst✝³ : Module R M'
inst✝² : Module R M₁
inst✝¹ : StrongRankCondition R
inst✝ : Module.Finite R M
ι : Type w
b : ι → M
h : LinearIndependent R b
⊢ lift.{max v w, w} #ι ≤ lift.{max v w, w} ↑(finrank R M)
state_after: no goals
tactic: simpa only [← finrank_eq_rank, lift_natCast, lift_le_nat_iff] using h.cardinal_lift_le_rank
Theorem: Mathlib.Vector.get_set_eq_if
File: Mathlib/Data/Vector/Basic.lean

Proof steps:
state_before: n : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
v : Vector α n
i j : Fin n
a : α
⊢ (v.set i a).get j = if i = j then a else v.get j
state_after: case neg
n : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
v : Vector α n
i j : Fin n
a : α
h✝ : ¬i = j
⊢ (v.set i a).get j = v.get j
tactic: split_ifs <;> (try simp [*])
state_before: case neg
n : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
v : Vector α n
i j : Fin n
a : α
h✝ : ¬i = j
⊢ (v.set i a).get j = v.get j
state_after: no goals
tactic: rwa [get_set_of_ne]
Theorem: Homeomorph.isPreconnected_image
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'
s : Set X
h : X ≃ₜ Y
hs : IsPreconnected (⇑h '' s)
⊢ IsPreconnected s
state_after: no goals
tactic: simpa only [image_symm, preimage_image]
    using hs.image _ h.symm.continuous.continuousOn
Theorem: CategoryTheory.mono_iff_isIso_fst
File: Mathlib/CategoryTheory/Limits/EpiMono.lean

Proof steps:
state_before: C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : C
f : X ⟶ Y
c : PullbackCone f f
hc : IsLimit c
⊢ Mono f ↔ IsIso c.fst
state_after: C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : C
f : X ⟶ Y
c : PullbackCone f f
hc : IsLimit c
⊢ c.fst = c.snd ↔ IsIso c.fst
tactic: rw [mono_iff_fst_eq_snd hc]
state_before: C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : C
f : X ⟶ Y
c : PullbackCone f f
hc : IsLimit c
⊢ c.fst = c.snd ↔ IsIso c.fst
state_after: case mp
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : C
f : X ⟶ Y
c : PullbackCone f f
hc : IsLimit c
⊢ c.fst = c.snd → IsIso c.fst

case mpr
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : C
f : X ⟶ Y
c : PullbackCone f f
hc : IsLimit c
⊢ IsIso c.fst → c.fst = c.snd
tactic: constructor
Theorem: Finset.map_comm
File: Mathlib/Data/Finset/Image.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f✝ : α ↪ β
s : Finset α
β' : Type u_4
f : β ↪ γ
g : α ↪ β
f' : α ↪ β'
g' : β' ↪ γ
h_comm : ∀ (a : α), f (g a) = g' (f' a)
⊢ map f (map g s) = map g' (map f' s)
state_after: no goals
tactic: simp_rw [map_map, Embedding.trans, Function.comp, h_comm]
Theorem: NNReal.nndist_zero_eq_val
File: Mathlib/Topology/MetricSpace/Pseudo/Constructions.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : PseudoMetricSpace α
z : ℝ≥0
⊢ nndist 0 z = z
state_after: no goals
tactic: simp only [NNReal.nndist_eq, max_eq_right, tsub_zero, zero_tsub, zero_le']
Theorem: Ideal.isIdempotentElem_iff_eq_bot_or_top_of_localRing
File: Mathlib/RingTheory/Filtration.lean

Proof steps:
state_before: R✝ M : Type u
inst✝⁵ : CommRing R✝
inst✝⁴ : AddCommGroup M
inst✝³ : Module R✝ M
I✝ : Ideal R✝
F F' : I✝.Filtration M
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsNoetherianRing R
inst✝ : LocalRing R
I : Ideal R
⊢ IsIdempotentElem I ↔ I = ⊥ ∨ I = ⊤
state_after: case mp
R✝ M : Type u
inst✝⁵ : CommRing R✝
inst✝⁴ : AddCommGroup M
inst✝³ : Module R✝ M
I✝ : Ideal R✝
F F' : I✝.Filtration M
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsNoetherianRing R
inst✝ : LocalRing R
I : Ideal R
⊢ IsIdempotentElem I → I = ⊥ ∨ I = ⊤

case mpr
R✝ M : Type u
inst✝⁵ : CommRing R✝
inst✝⁴ : AddCommGroup M
inst✝³ : Module R✝ M
I✝ : Ideal R✝
F F' : I✝.Filtration M
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsNoetherianRing R
inst✝ : LocalRing R
I : Ideal R
⊢ I = ⊥ ∨ I = ⊤ → IsIdempotentElem I
tactic: constructor
Theorem: CategoryTheory.Limits.biprod_isoCoprod_hom
File: Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean

Proof steps:
state_before: J : Type w
C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
D : Type uD
inst✝² : Category.{uD', uD} D
inst✝¹ : HasZeroMorphisms D
P Q X Y : C
inst✝ : HasBinaryBiproduct X Y
⊢ (biprod.isoCoprod X Y).hom = biprod.desc coprod.inl coprod.inr
state_after: no goals
tactic: ext <;> simp [← Iso.eq_comp_inv]
Theorem: Real.arctan_inv_of_neg
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Arctan.lean

Proof steps:
state_before: x : ℝ
h : x < 0
⊢ arctan x⁻¹ = -(π / 2) - arctan x
state_after: x : ℝ
h : x < 0
this : arctan (-x)⁻¹ = π / 2 - arctan (-x)
⊢ arctan x⁻¹ = -(π / 2) - arctan x
tactic: have := arctan_inv_of_pos (neg_pos.mpr h)
state_before: x : ℝ
h : x < 0
this : arctan (-x)⁻¹ = π / 2 - arctan (-x)
⊢ arctan x⁻¹ = -(π / 2) - arctan x
state_after: no goals
tactic: rwa [inv_neg, arctan_neg, neg_eq_iff_eq_neg, neg_sub', arctan_neg, neg_neg] at this
Theorem: AddSubmonoid.LocalizationMap.map_right_cancel
File: Mathlib/GroupTheory/MonoidLocalization/Basic.lean

Proof steps:
state_before: M : Type u_1
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝¹ : CommMonoid N
P : Type u_3
inst✝ : CommMonoid P
f : S.LocalizationMap N
x y : M
c : ↥S
h : f.toMap (↑c * x) = f.toMap (↑c * y)
⊢ f.toMap x = f.toMap y
state_after: M : Type u_1
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝¹ : CommMonoid N
P : Type u_3
inst✝ : CommMonoid P
f : S.LocalizationMap N
x y : M
c : ↥S
h : f.toMap ↑c * f.toMap x = f.toMap ↑c * f.toMap y
⊢ f.toMap x = f.toMap y
tactic: rw [f.toMap.map_mul, f.toMap.map_mul] at h
state_before: M : Type u_1
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝¹ : CommMonoid N
P : Type u_3
inst✝ : CommMonoid P
f : S.LocalizationMap N
x y : M
c : ↥S
h : f.toMap ↑c * f.toMap x = f.toMap ↑c * f.toMap y
⊢ f.toMap x = f.toMap y
state_after: M : Type u_1
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝¹ : CommMonoid N
P : Type u_3
inst✝ : CommMonoid P
f : S.LocalizationMap N
x y : M
c : ↥S
h : f.toMap ↑c * f.toMap x = f.toMap ↑c * f.toMap y
u : Nˣ
hu : ↑u = f.toMap ↑c
⊢ f.toMap x = f.toMap y
tactic: let ⟨u, hu⟩ := f.map_units c
state_before: M : Type u_1
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝¹ : CommMonoid N
P : Type u_3
inst✝ : CommMonoid P
f : S.LocalizationMap N
x y : M
c : ↥S
h : f.toMap ↑c * f.toMap x = f.toMap ↑c * f.toMap y
u : Nˣ
hu : ↑u = f.toMap ↑c
⊢ f.toMap x = f.toMap y
state_after: M : Type u_1
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝¹ : CommMonoid N
P : Type u_3
inst✝ : CommMonoid P
f : S.LocalizationMap N
x y : M
c : ↥S
u : Nˣ
h : ↑u * f.toMap x = ↑u * f.toMap y
hu : ↑u = f.toMap ↑c
⊢ f.toMap x = f.toMap y
tactic: rw [← hu] at h
state_before: M : Type u_1
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝¹ : CommMonoid N
P : Type u_3
inst✝ : CommMonoid P
f : S.LocalizationMap N
x y : M
c : ↥S
u : Nˣ
h : ↑u * f.toMap x = ↑u * f.toMap y
hu : ↑u = f.toMap ↑c
⊢ f.toMap x = f.toMap y
state_after: no goals
tactic: exact (Units.mul_right_inj u).1 h
Theorem: CategoryTheory.presheafHom_map_app
File: Mathlib/CategoryTheory/Sites/SheafHom.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝ : Category.{v', u'} A
F G : Cᵒᵖ ⥤ A
X Y Z : C
f : Z ⟶ Y
g : Y ⟶ X
h : Z ⟶ X
w : f ≫ g = h
α : (presheafHom F G).obj (op X)
⊢ ((presheafHom F G).map g.op α).app (op (Over.mk f)) = α.app (op (Over.mk h))
state_after: C : Type u
inst✝¹ : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝ : Category.{v', u'} A
F G : Cᵒᵖ ⥤ A
X Y Z : C
f : Z ⟶ Y
g : Y ⟶ X
α : (presheafHom F G).obj (op X)
⊢ ((presheafHom F G).map g.op α).app (op (Over.mk f)) = α.app (op (Over.mk (f ≫ g)))
tactic: subst w
state_before: C : Type u
inst✝¹ : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝ : Category.{v', u'} A
F G : Cᵒᵖ ⥤ A
X Y Z : C
f : Z ⟶ Y
g : Y ⟶ X
α : (presheafHom F G).obj (op X)
⊢ ((presheafHom F G).map g.op α).app (op (Over.mk f)) = α.app (op (Over.mk (f ≫ g)))
state_after: no goals
tactic: rfl