ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: orderOf_eq_card_of_forall_mem_zpowers
File: Mathlib/GroupTheory/SpecificGroups/Cyclic.lean

Proof steps:
state_before: α : Type u
a : α
inst✝¹ : Group α
inst✝ : Fintype α
g : α
hx : ∀ (x : α), x ∈ zpowers g
⊢ orderOf g = Fintype.card α
state_after: no goals
tactic: classical
    rw [← Fintype.card_zpowers]
    apply Fintype.card_of_finset'
    simpa using hx
Theorem: affineSpan_induction'
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

Proof steps:
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
s : Set P
p : (x : P) → x ∈ affineSpan k s → Prop
mem : ∀ (y : P) (hys : y ∈ s), p y ⋯
smul_vsub_vadd :
  ∀ (c : k) (u : P) (hu : u ∈ affineSpan k s) (v : P) (hv : v ∈ affineSpan k s) (w : P) (hw : w ∈ affineSpan k s),
    p u hu → p v hv → p w hw → p (c • (u -ᵥ v) +ᵥ w) ⋯
x : P
h : x ∈ affineSpan k s
⊢ p x h
state_after: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
s : Set P
p : (x : P) → x ∈ affineSpan k s → Prop
mem : ∀ (y : P) (hys : y ∈ s), p y ⋯
smul_vsub_vadd :
  ∀ (c : k) (u : P) (hu : u ∈ affineSpan k s) (v : P) (hv : v ∈ affineSpan k s) (w : P) (hw : w ∈ affineSpan k s),
    p u hu → p v hv → p w hw → p (c • (u -ᵥ v) +ᵥ w) ⋯
x : P
h : x ∈ affineSpan k s
⊢ ∃ (x_1 : x ∈ affineSpan k s), p x x_1
tactic: refine Exists.elim ?_ fun (hx : x ∈ affineSpan k s) (hc : p x hx) => hc
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
s : Set P
p : (x : P) → x ∈ affineSpan k s → Prop
mem : ∀ (y : P) (hys : y ∈ s), p y ⋯
smul_vsub_vadd :
  ∀ (c : k) (u : P) (hu : u ∈ affineSpan k s) (v : P) (hv : v ∈ affineSpan k s) (w : P) (hw : w ∈ affineSpan k s),
    p u hu → p v hv → p w hw → p (c • (u -ᵥ v) +ᵥ w) ⋯
x : P
h : x ∈ affineSpan k s
⊢ ∃ (x_1 : x ∈ affineSpan k s), p x x_1
state_after: case refine_1
k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
s : Set P
p : (x : P) → x ∈ affineSpan k s → Prop
mem : ∀ (y : P) (hys : y ∈ s), p y ⋯
smul_vsub_vadd :
  ∀ (c : k) (u : P) (hu : u ∈ affineSpan k s) (v : P) (hv : v ∈ affineSpan k s) (w : P) (hw : w ∈ affineSpan k s),
    p u hu → p v hv → p w hw → p (c • (u -ᵥ v) +ᵥ w) ⋯
x : P
h : x ∈ affineSpan k s
⊢ ∀ x ∈ s, (fun y => ∃ (z : y ∈ affineSpan k s), p y z) x

case refine_2
k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
s : Set P
p : (x : P) → x ∈ affineSpan k s → Prop
mem : ∀ (y : P) (hys : y ∈ s), p y ⋯
smul_vsub_vadd :
  ∀ (c : k) (u : P) (hu : u ∈ affineSpan k s) (v : P) (hv : v ∈ affineSpan k s) (w : P) (hw : w ∈ affineSpan k s),
    p u hu → p v hv → p w hw → p (c • (u -ᵥ v) +ᵥ w) ⋯
x : P
h : x ∈ affineSpan k s
⊢ ∀ (c : k) (u v w : P),
    (fun y => ∃ (z : y ∈ affineSpan k s), p y z) u →
      (fun y => ∃ (z : y ∈ affineSpan k s), p y z) v →
        (fun y => ∃ (z : y ∈ affineSpan k s), p y z) w →
          (fun y => ∃ (z : y ∈ affineSpan k s), p y z) (c • (u -ᵥ v) +ᵥ w)
tactic: refine affineSpan_induction (p := fun y => ∃ z, p y z) h ?_ ?_
Theorem: Fin.sum_univ_one
File: Mathlib/Algebra/BigOperators/Fin.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : CommMonoid β
f : Fin 1 → β
⊢ ∏ i : Fin 1, f i = f 0
state_after: no goals
tactic: simp
Theorem: ProbabilityTheory.Kernel.snd_swapRight
File: Mathlib/Probability/Kernel/Composition.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
δ : Type u_4
mδ : MeasurableSpace δ
γ : Type u_5
mγ : MeasurableSpace γ
f : β → γ
g : γ → α
κ : Kernel α (β × γ)
⊢ κ.swapRight.snd = κ.fst
state_after: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
δ : Type u_4
mδ : MeasurableSpace δ
γ : Type u_5
mγ : MeasurableSpace γ
f : β → γ
g : γ → α
κ : Kernel α (β × γ)
a : α
s : Set β
hs : MeasurableSet s
⊢ (κ.swapRight.snd a) s = (κ.fst a) s
tactic: ext a s hs
state_before: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
δ : Type u_4
mδ : MeasurableSpace δ
γ : Type u_5
mγ : MeasurableSpace γ
f : β → γ
g : γ → α
κ : Kernel α (β × γ)
a : α
s : Set β
hs : MeasurableSet s
⊢ (κ.swapRight.snd a) s = (κ.fst a) s
state_after: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
δ : Type u_4
mδ : MeasurableSpace δ
γ : Type u_5
mγ : MeasurableSpace γ
f : β → γ
g : γ → α
κ : Kernel α (β × γ)
a : α
s : Set β
hs : MeasurableSet s
⊢ (κ a) {p | p.swap ∈ {p | p.2 ∈ s}} = (κ a) {p | p.1 ∈ s}

case h.h.hs
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
δ : Type u_4
mδ : MeasurableSpace δ
γ : Type u_5
mγ : MeasurableSpace γ
f : β → γ
g : γ → α
κ : Kernel α (β × γ)
a : α
s : Set β
hs : MeasurableSet s
⊢ MeasurableSet {p | p.2 ∈ s}
tactic: rw [snd_apply' _ _ hs, swapRight_apply', fst_apply' _ _ hs]
Theorem: Cardinal.mk_set
File: Mathlib/SetTheory/Cardinal/Basic.lean

Proof steps:
state_before: α✝ β α : Type u
⊢ #(Set α) = 2 ^ #α
state_after: no goals
tactic: simp [← one_add_one_eq_two, Set, mk_arrow]
Theorem: AddSubgroup.index_ne_zero_of_finite
File: Mathlib/GroupTheory/Index.lean

Proof steps:
state_before: G : Type u_1
G' : Type u_2
inst✝¹ : Group G
inst✝ : Group G'
H K L : Subgroup G
hH : Finite (G ⧸ H)
⊢ H.index ≠ 0
state_after: case intro
G : Type u_1
G' : Type u_2
inst✝¹ : Group G
inst✝ : Group G'
H K L : Subgroup G
hH : Finite (G ⧸ H)
val✝ : Fintype (G ⧸ H)
⊢ H.index ≠ 0
tactic: cases nonempty_fintype (G ⧸ H)
state_before: case intro
G : Type u_1
G' : Type u_2
inst✝¹ : Group G
inst✝ : Group G'
H K L : Subgroup G
hH : Finite (G ⧸ H)
val✝ : Fintype (G ⧸ H)
⊢ H.index ≠ 0
state_after: case intro
G : Type u_1
G' : Type u_2
inst✝¹ : Group G
inst✝ : Group G'
H K L : Subgroup G
hH : Finite (G ⧸ H)
val✝ : Fintype (G ⧸ H)
⊢ Nat.card (G ⧸ H) ≠ 0
tactic: rw [index_eq_card]
state_before: case intro
G : Type u_1
G' : Type u_2
inst✝¹ : Group G
inst✝ : Group G'
H K L : Subgroup G
hH : Finite (G ⧸ H)
val✝ : Fintype (G ⧸ H)
⊢ Nat.card (G ⧸ H) ≠ 0
state_after: no goals
tactic: exact Nat.card_pos.ne'
Theorem: MeasurableSpace.DynkinSystem.has_union
File: Mathlib/MeasureTheory/PiSystem.lean

Proof steps:
state_before: α : Type u_1
d : DynkinSystem α
s₁ s₂ : Set α
h₁ : d.Has s₁
h₂ : d.Has s₂
h : Disjoint s₁ s₂
⊢ d.Has (s₁ ∪ s₂)
state_after: α : Type u_1
d : DynkinSystem α
s₁ s₂ : Set α
h₁ : d.Has s₁
h₂ : d.Has s₂
h : Disjoint s₁ s₂
⊢ d.Has (⋃ b, bif b then s₁ else s₂)
tactic: rw [union_eq_iUnion]
state_before: α : Type u_1
d : DynkinSystem α
s₁ s₂ : Set α
h₁ : d.Has s₁
h₂ : d.Has s₂
h : Disjoint s₁ s₂
⊢ d.Has (⋃ b, bif b then s₁ else s₂)
state_after: no goals
tactic: exact d.has_iUnion (pairwise_disjoint_on_bool.2 h) (Bool.forall_bool.2 ⟨h₂, h₁⟩)
Theorem: HasFPowerSeriesOnBall.sub
File: Mathlib/Analysis/Analytic/Basic.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∞
hf : HasFPowerSeriesOnBall f pf x r
hg : HasFPowerSeriesOnBall g pg x r
⊢ HasFPowerSeriesOnBall (f - g) (pf - pg) x r
state_after: no goals
tactic: simpa only [sub_eq_add_neg] using hf.add hg.neg
Theorem: sup_sdiff_inf
File: Mathlib/Order/BooleanAlgebra.lean

Proof steps:
state_before: α : Type u
β : Type u_1
w x✝ y✝ z : α
inst✝ : GeneralizedBooleanAlgebra α
x y : α
⊢ x \ y ⊔ x ⊓ y = x
state_after: no goals
tactic: rw [sup_comm, sup_inf_sdiff]
Theorem: Set.Finite.image
File: Mathlib/Data/Set/Finite.lean

Proof steps:
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
f : α → β
hs : s.Finite
⊢ (f '' s).Finite
state_after: α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
f : α → β
hs : s.Finite
this : Finite ↑s
⊢ (f '' s).Finite
tactic: have := hs.to_subtype
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
f : α → β
hs : s.Finite
this : Finite ↑s
⊢ (f '' s).Finite
state_after: no goals
tactic: apply toFinite
Theorem: CategoryTheory.OverPresheafAux.OverArrows.map_val
File: Mathlib/CategoryTheory/Comma/Presheaf.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
A : Cᵒᵖ ⥤ Type v
Y : C
η : yoneda.obj Y ⟶ A
X : C
s : yoneda.obj X ⟶ A
p : OverArrows η s
⊢ yoneda.map p.val ≫ η = s
state_after: C : Type u
inst✝ : Category.{v, u} C
A : Cᵒᵖ ⥤ Type v
Y : C
η : yoneda.obj Y ⟶ A
X : C
s : yoneda.obj X ⟶ A
p : OverArrows η s
⊢ η.app (op (unop (op X))) p.val = yonedaEquiv s
tactic: rw [← yonedaEquiv.injective.eq_iff, yonedaEquiv_comp, yonedaEquiv_yoneda_map]
state_before: C : Type u
inst✝ : Category.{v, u} C
A : Cᵒᵖ ⥤ Type v
Y : C
η : yoneda.obj Y ⟶ A
X : C
s : yoneda.obj X ⟶ A
p : OverArrows η s
⊢ η.app (op (unop (op X))) p.val = yonedaEquiv s
state_after: no goals
tactic: simp only [unop_op, p.app_val]
Theorem: Polynomial.multiplicity_X_sub_C_finite
File: Mathlib/Algebra/Polynomial/Div.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : Ring R
p q : R[X]
a : R
h0 : p ≠ 0
⊢ multiplicity.Finite (X - C a) p
state_after: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : Ring R
p q : R[X]
a : R
h0 : p ≠ 0
this : Nontrivial R
⊢ multiplicity.Finite (X - C a) p
tactic: haveI := Nontrivial.of_polynomial_ne h0
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : Ring R
p q : R[X]
a : R
h0 : p ≠ 0
this : Nontrivial R
⊢ multiplicity.Finite (X - C a) p
state_after: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : Ring R
p q : R[X]
a : R
h0 : p ≠ 0
this : Nontrivial R
⊢ 0 < (X - C a).degree
tactic: refine multiplicity_finite_of_degree_pos_of_monic ?_ (monic_X_sub_C _) h0
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : Ring R
p q : R[X]
a : R
h0 : p ≠ 0
this : Nontrivial R
⊢ 0 < (X - C a).degree
state_after: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : Ring R
p q : R[X]
a : R
h0 : p ≠ 0
this : Nontrivial R
⊢ 0 < 1
tactic: rw [degree_X_sub_C]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : Ring R
p q : R[X]
a : R
h0 : p ≠ 0
this : Nontrivial R
⊢ 0 < 1
state_after: no goals
tactic: decide
Theorem: one_zsmul
File: Mathlib/Algebra/Group/Defs.lean

Proof steps:
state_before: G : Type u_1
inst✝ : DivInvMonoid G
a✝ b a : G
⊢ a ^ 1 = a
state_after: no goals
tactic: rw [zpow_ofNat, pow_one]
Theorem: Filter.tendsto_nhds_atTop_iff
File: Mathlib/Topology/Filter.lean

Proof steps:
state_before: ι : Sort u_1
α : Type u_2
β : Type u_3
X : Type u_4
Y : Type u_5
inst✝ : Preorder β
l : Filter α
f : α → Filter β
⊢ Tendsto f l (𝓝 atTop) ↔ ∀ (y : β), ∀ᶠ (a : α) in l, Ici y ∈ f a
state_after: no goals
tactic: simp only [nhds_atTop, tendsto_iInf, tendsto_principal, mem_Iic, le_principal_iff]
Theorem: UniqueFactorizationMonoid.exists_prime_iff
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
⊢ (∃ p, Prime p) ↔ ∃ x, x ≠ 0 ∧ ¬IsUnit x
state_after: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
x✝ : ∃ x, x ≠ 0 ∧ ¬IsUnit x
x : α
hx₀ : x ≠ 0
hxu : ¬IsUnit x
⊢ ∃ p, Prime p
tactic: refine ⟨fun ⟨p, hp⟩ ↦ ⟨p, hp.ne_zero, hp.not_unit⟩, fun ⟨x, hx₀, hxu⟩ ↦ ?_⟩
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
x✝ : ∃ x, x ≠ 0 ∧ ¬IsUnit x
x : α
hx₀ : x ≠ 0
hxu : ¬IsUnit x
⊢ ∃ p, Prime p
state_after: case intro.intro
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
x✝ : ∃ x, x ≠ 0 ∧ ¬IsUnit x
x : α
hx₀ : x ≠ 0
hxu : ¬IsUnit x
f : α
hf : Irreducible f
⊢ ∃ p, Prime p
tactic: obtain ⟨f, hf, -⟩ := WfDvdMonoid.exists_irreducible_factor hxu hx₀
state_before: case intro.intro
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
x✝ : ∃ x, x ≠ 0 ∧ ¬IsUnit x
x : α
hx₀ : x ≠ 0
hxu : ¬IsUnit x
f : α
hf : Irreducible f
⊢ ∃ p, Prime p
state_after: no goals
tactic: exact ⟨f, UniqueFactorizationMonoid.irreducible_iff_prime.mp hf⟩
Theorem: MultilinearMap.map_add_sub_map_add_sub_linearDeriv
File: Mathlib/LinearAlgebra/Multilinear/Basic.lean

Proof steps:
state_before: R : Type uR
S : Type uS
ι : Type uι
n : ℕ
M : Fin n.succ → Type v
M₁ : ι → Type v₁
M₂ : Type v₂
M₃ : Type v₃
M' : Type v'
inst✝⁶ : Semiring R
inst✝⁵ : (i : ι) → AddCommGroup (M₁ i)
inst✝⁴ : AddCommGroup M₂
inst✝³ : (i : ι) → Module R (M₁ i)
inst✝² : Module R M₂
f : MultilinearMap R M₁ M₂
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
x h h' : (i : ι) → M₁ i
⊢ f (x + h) - f (x + h') - (f.linearDeriv x) (h - h') =
    ∑ s ∈ filter (fun x => 2 ≤ x.card) Finset.univ.powerset, (f (s.piecewise h x) - f (s.piecewise h' x))
state_after: no goals
tactic: simp_rw [map_add_eq_map_add_linearDeriv_add, add_assoc, add_sub_add_comm, sub_self, zero_add,
    ← LinearMap.map_sub, add_sub_cancel_left, sum_sub_distrib]
Theorem: Filter.tendsto_cocompact_mul_right
File: Mathlib/Topology/Algebra/Monoid.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
M : Type u_3
N : Type u_4
X : Type u_5
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace M
inst✝¹ : Monoid M
inst✝ : ContinuousMul M
a b : M
ha : a * b = 1
⊢ Tendsto (fun x => x * a) (cocompact M) (cocompact M)
state_after: ι : Type u_1
α : Type u_2
M : Type u_3
N : Type u_4
X : Type u_5
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace M
inst✝¹ : Monoid M
inst✝ : ContinuousMul M
a b : M
ha : a * b = 1
⊢ Tendsto ((fun b_1 => b_1 * b) ∘ fun x => x * a) (cocompact M) (cocompact M)
tactic: refine Filter.Tendsto.of_tendsto_comp ?_ (Filter.comap_cocompact_le (continuous_mul_right b))
state_before: ι : Type u_1
α : Type u_2
M : Type u_3
N : Type u_4
X : Type u_5
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace M
inst✝¹ : Monoid M
inst✝ : ContinuousMul M
a b : M
ha : a * b = 1
⊢ Tendsto ((fun b_1 => b_1 * b) ∘ fun x => x * a) (cocompact M) (cocompact M)
state_after: ι : Type u_1
α : Type u_2
M : Type u_3
N : Type u_4
X : Type u_5
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace M
inst✝¹ : Monoid M
inst✝ : ContinuousMul M
a b : M
ha : a * b = 1
⊢ Tendsto (fun x => x) (cocompact M) (cocompact M)
tactic: simp only [comp_mul_right, ha, mul_one]
state_before: ι : Type u_1
α : Type u_2
M : Type u_3
N : Type u_4
X : Type u_5
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace M
inst✝¹ : Monoid M
inst✝ : ContinuousMul M
a b : M
ha : a * b = 1
⊢ Tendsto (fun x => x) (cocompact M) (cocompact M)
state_after: no goals
tactic: exact Filter.tendsto_id
Theorem: le_levenshtein_append
File: Mathlib/Data/List/EditDistance/Bounds.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
δ : Type u_3
C : Levenshtein.Cost α β δ
inst✝ : CanonicallyLinearOrderedAddCommMonoid δ
xs : List α
ys₁ ys₂ : List β
⊢ ∃ xs', xs' <:+ xs ∧ levenshtein C xs' ys₂ ≤ levenshtein C xs (ys₁ ++ ys₂)
state_after: no goals
tactic: simpa [suffixLevenshtein_eq_tails_map, List.minimum_le_coe_iff] using
    suffixLevenshtein_minimum_le_levenshtein_append (δ := δ) xs ys₁ ys₂
Theorem: Quaternion.exp_of_re_eq_zero
File: Mathlib/Analysis/NormedSpace/QuaternionExponential.lean

Proof steps:
state_before: q : ℍ
hq : q.re = 0
⊢ exp ℝ q = ↑(Real.cos ‖q‖) + (Real.sin ‖q‖ / ‖q‖) • q
state_after: q : ℍ
hq : q.re = 0
⊢ (fun x => ∑' (n : ℕ), (↑n !)⁻¹ • x ^ n) q = ↑(Real.cos ‖q‖) + (Real.sin ‖q‖ / ‖q‖) • q
tactic: rw [exp_eq_tsum]
state_before: q : ℍ
hq : q.re = 0
⊢ (fun x => ∑' (n : ℕ), (↑n !)⁻¹ • x ^ n) q = ↑(Real.cos ‖q‖) + (Real.sin ‖q‖ / ‖q‖) • q
state_after: q : ℍ
hq : q.re = 0
⊢ HasSum (fun n => (↑n !)⁻¹ • q ^ n) (↑(Real.cos ‖q‖) + (Real.sin ‖q‖ / ‖q‖) • q)
tactic: refine HasSum.tsum_eq ?_
state_before: q : ℍ
hq : q.re = 0
⊢ HasSum (fun n => (↑n !)⁻¹ • q ^ n) (↑(Real.cos ‖q‖) + (Real.sin ‖q‖ / ‖q‖) • q)
state_after: q : ℍ
hq : q.re = 0
⊢ HasSum (fun n => (expSeries ℝ ℍ n) fun x => q) (↑(Real.cos ‖q‖) + (Real.sin ‖q‖ / ‖q‖) • q)
tactic: simp_rw [← expSeries_apply_eq]
state_before: q : ℍ
hq : q.re = 0
⊢ HasSum (fun n => (expSeries ℝ ℍ n) fun x => q) (↑(Real.cos ‖q‖) + (Real.sin ‖q‖ / ‖q‖) • q)
state_after: no goals
tactic: exact hasSum_expSeries_of_imaginary hq (Real.hasSum_cos _) (Real.hasSum_sin _)
Theorem: Nat.choose_zero_right
File: Mathlib/Data/Nat/Choose/Basic.lean

Proof steps:
state_before: n : ℕ
⊢ n.choose 0 = 1
state_after: no goals
tactic: cases n <;> rfl
Theorem: Finset.iInf_singleton
File: Mathlib/Data/Finset/Lattice.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝ : CompleteLattice β
a : α
s : α → β
⊢ ⨅ x ∈ {a}, s x = s a
state_after: no goals
tactic: simp
Theorem: CommMonoid.torsion.isTorsion
File: Mathlib/GroupTheory/Torsion.lean

Proof steps:
state_before: G : Type u_1
H : Type u_2
inst✝ : CommMonoid G
x✝ : ↥(torsion G)
x : G
n : ℕ
npos : n > 0
hn : Function.IsPeriodicPt (fun x_1 => x * x_1) n 1
⊢ ↑((fun x_1 => ⟨x, ⋯⟩ * x_1)^[n] 1) = ↑1
state_after: G : Type u_1
H : Type u_2
inst✝ : CommMonoid G
x✝ : ↥(torsion G)
x : G
n : ℕ
npos : n > 0
hn : Function.IsPeriodicPt (fun x_1 => x * x_1) n 1
⊢ ↑((fun x_1 => ⟨x, ⋯⟩ * x_1)^[n] 1) = 1
tactic: dsimp
state_before: G : Type u_1
H : Type u_2
inst✝ : CommMonoid G
x✝ : ↥(torsion G)
x : G
n : ℕ
npos : n > 0
hn : Function.IsPeriodicPt (fun x_1 => x * x_1) n 1
⊢ ↑((fun x_1 => ⟨x, ⋯⟩ * x_1)^[n] 1) = 1
state_after: G : Type u_1
H : Type u_2
inst✝ : CommMonoid G
x✝ : ↥(torsion G)
x : G
n : ℕ
npos : n > 0
hn : Function.IsPeriodicPt (fun x_1 => x * x_1) n 1
⊢ ↑((fun x_1 => ⟨x, ⋯⟩ ^ n * x_1) 1) = 1
tactic: rw [mul_left_iterate]
state_before: G : Type u_1
H : Type u_2
inst✝ : CommMonoid G
x✝ : ↥(torsion G)
x : G
n : ℕ
npos : n > 0
hn : Function.IsPeriodicPt (fun x_1 => x * x_1) n 1
⊢ ↑((fun x_1 => ⟨x, ⋯⟩ ^ n * x_1) 1) = 1
state_after: G : Type u_1
H : Type u_2
inst✝ : CommMonoid G
x✝ : ↥(torsion G)
x : G
n : ℕ
npos : n > 0
hn : Function.IsPeriodicPt (fun x_1 => x * x_1) n 1
⊢ ↑(⟨x, ⋯⟩ ^ n) * 1 = 1
tactic: change _ * 1 = 1
state_before: G : Type u_1
H : Type u_2
inst✝ : CommMonoid G
x✝ : ↥(torsion G)
x : G
n : ℕ
npos : n > 0
hn : Function.IsPeriodicPt (fun x_1 => x * x_1) n 1
⊢ ↑(⟨x, ⋯⟩ ^ n) * 1 = 1
state_after: no goals
tactic: rw [_root_.mul_one, SubmonoidClass.coe_pow, Subtype.coe_mk,
        (isPeriodicPt_mul_iff_pow_eq_one _).mp hn]
Theorem: IsCyclotomicExtension.iff_singleton
File: Mathlib/NumberTheory/Cyclotomic/Basic.lean

Proof steps:
state_before: n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : Algebra A B
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
⊢ IsCyclotomicExtension {n} A B ↔ (∃ r, IsPrimitiveRoot r ↑n) ∧ ∀ (x : B), x ∈ adjoin A {b | b ^ ↑n = 1}
state_after: no goals
tactic: simp [isCyclotomicExtension_iff]
Theorem: Matroid.Basis.eq_exchange_of_diff_eq_singleton
File: Mathlib/Data/Matroid/Restrict.lean

Proof steps:
state_before: α : Type u_1
M : Matroid α
R I J✝ X Y B J : Set α
e : α
hI : M.Basis I X
hJ : M.Basis J X
hIJ : I \ J = {e}
⊢ ∃ f ∈ J \ I, J = insert f I \ {e}
state_after: α : Type u_1
M : Matroid α
R I J✝ X Y B J : Set α
e : α
hI : (M ↾ X).Base I
hJ : (M ↾ X).Base J
hIJ : I \ J = {e}
⊢ ∃ f ∈ J \ I, J = insert f I \ {e}
tactic: rw [← base_restrict_iff] at hI hJ
state_before: α : Type u_1
M : Matroid α
R I J✝ X Y B J : Set α
e : α
hI : (M ↾ X).Base I
hJ : (M ↾ X).Base J
hIJ : I \ J = {e}
⊢ ∃ f ∈ J \ I, J = insert f I \ {e}
state_after: no goals
tactic: exact hI.eq_exchange_of_diff_eq_singleton hJ hIJ
Theorem: Multiset.noncommSum_cons'
File: Mathlib/Data/Finset/NoncommProd.lean

Proof steps:
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : α → β → β
op : α → α → α
inst✝¹ : Monoid α
inst✝ : Monoid β
s : Multiset α
a : α
comm : {x | x ∈ a ::ₘ s}.Pairwise Commute
⊢ (a ::ₘ s).noncommProd comm = s.noncommProd ⋯ * a
state_after: case h
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : α → β → β
op : α → α → α
inst✝¹ : Monoid α
inst✝ : Monoid β
a : α
s : List α
comm : {x | x ∈ a ::ₘ ⟦s⟧}.Pairwise Commute
⊢ (a ::ₘ ⟦s⟧).noncommProd comm = noncommProd ⟦s⟧ ⋯ * a
tactic: induction' s using Quotient.inductionOn with s
state_before: case h
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : α → β → β
op : α → α → α
inst✝¹ : Monoid α
inst✝ : Monoid β
a : α
s : List α
comm : {x | x ∈ a ::ₘ ⟦s⟧}.Pairwise Commute
⊢ (a ::ₘ ⟦s⟧).noncommProd comm = noncommProd ⟦s⟧ ⋯ * a
state_after: case h
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : α → β → β
op : α → α → α
inst✝¹ : Monoid α
inst✝ : Monoid β
a : α
s : List α
comm : {x | x ∈ a ::ₘ ⟦s⟧}.Pairwise Commute
⊢ a * s.prod = s.prod * a
tactic: simp only [quot_mk_to_coe, cons_coe, noncommProd_coe, List.prod_cons]
state_before: case h
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : α → β → β
op : α → α → α
inst✝¹ : Monoid α
inst✝ : Monoid β
a : α
s : List α
comm : {x | x ∈ a ::ₘ ⟦s⟧}.Pairwise Commute
⊢ a * s.prod = s.prod * a
state_after: case h.nil
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : α → β → β
op : α → α → α
inst✝¹ : Monoid α
inst✝ : Monoid β
a : α
comm : {x | x ∈ a ::ₘ ⟦[]⟧}.Pairwise Commute
⊢ a * [].prod = [].prod * a

case h.cons
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : α → β → β
op : α → α → α
inst✝¹ : Monoid α
inst✝ : Monoid β
a hd : α
tl : List α
IH : {x | x ∈ a ::ₘ ⟦tl⟧}.Pairwise Commute → a * tl.prod = tl.prod * a
comm : {x | x ∈ a ::ₘ ⟦hd :: tl⟧}.Pairwise Commute
⊢ a * (hd :: tl).prod = (hd :: tl).prod * a
tactic: induction' s with hd tl IH
Theorem: Bool.left_le_or
File: Mathlib/Data/Bool/Basic.lean

Proof steps:
state_before: ⊢ ∀ (x y : Bool), x ≤ (x || y)
state_after: no goals
tactic: decide
Theorem: Cardinal.mk_perm_eq_self_power
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

Proof steps:
state_before: α β : Type u
β' : Type v
inst✝ : Infinite α
⊢ #(α → α) ≤ #(α ≃ α)
state_after: α β : Type u
β' : Type v
inst✝ : Infinite α
⊢ Nonempty ((α → Bool) ↪ Perm (α × Bool))
tactic: suffices Nonempty ((α → Bool) ↪ Equiv.Perm (α × Bool)) by
      obtain ⟨e⟩ : Nonempty (α ≃ α × Bool) := by
        erw [← Cardinal.eq, mk_prod, lift_uzero, mk_bool,
          lift_natCast, mul_two, add_eq_self (aleph0_le_mk α)]
      erw [← le_def, mk_arrow, lift_uzero, mk_bool, lift_natCast 2] at this
      rwa [← power_def, power_self_eq (aleph0_le_mk α), e.permCongr.cardinal_eq]
state_before: α β : Type u
β' : Type v
inst✝ : Infinite α
⊢ Nonempty ((α → Bool) ↪ Perm (α × Bool))
state_after: case refine_1
α β : Type u
β' : Type v
inst✝ : Infinite α
f : α → Bool
x : α × Bool
⊢ (fun x => (x.1, xor (f x.1) x.2)) ((fun x => (x.1, xor (f x.1) x.2)) x) = x

case refine_2
α β : Type u
β' : Type v
inst✝ : Infinite α
f g : α → Bool
h :
  (fun f => Involutive.toPerm (fun x => (x.1, xor (f x.1) x.2)) ⋯) f =
    (fun f => Involutive.toPerm (fun x => (x.1, xor (f x.1) x.2)) ⋯) g
⊢ f = g
tactic: refine ⟨⟨fun f ↦ Involutive.toPerm (fun x ↦ ⟨x.1, xor (f x.1) x.2⟩) fun x ↦ ?_, fun f g h ↦ ?_⟩⟩
Theorem: Metric.sphere_union_ball
File: Mathlib/Topology/MetricSpace/Pseudo/Defs.lean

Proof steps:
state_before: α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
⊢ sphere x ε ∪ ball x ε = closedBall x ε
state_after: no goals
tactic: rw [union_comm, ball_union_sphere]
Theorem: WithBot.unbot'_lt_iff
File: Mathlib/Order/WithBot.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a✝ b✝ : α
inst✝ : LT α
a : WithBot α
b c : α
h : a = ⊥ → b < c
⊢ unbot' b a < c ↔ a < ↑c
state_after: case bot
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a b✝ : α
inst✝ : LT α
b c : α
h : ⊥ = ⊥ → b < c
⊢ unbot' b ⊥ < c ↔ ⊥ < ↑c

case coe
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a b✝ : α
inst✝ : LT α
b c a✝ : α
h : ↑a✝ = ⊥ → b < c
⊢ unbot' b ↑a✝ < c ↔ ↑a✝ < ↑c
tactic: induction a