ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Matrix.StdBasisMatrix.mul_same
File: Mathlib/Data/Matrix/Basis.lean

Proof steps:
state_before: l : Type u_1
m : Type u_2
n : Type u_3
R : Type u_4
α : Type u_5
inst✝⁴ : DecidableEq l
inst✝³ : DecidableEq m
inst✝² : DecidableEq n
inst✝¹ : Semiring α
i j : n
c : α
i' j' : n
inst✝ : Fintype n
k : n
d : α
⊢ stdBasisMatrix i j c * stdBasisMatrix j k d = stdBasisMatrix i k (c * d)
state_after: case a
l : Type u_1
m : Type u_2
n : Type u_3
R : Type u_4
α : Type u_5
inst✝⁴ : DecidableEq l
inst✝³ : DecidableEq m
inst✝² : DecidableEq n
inst✝¹ : Semiring α
i j : n
c : α
i' j' : n
inst✝ : Fintype n
k : n
d : α
a b : n
⊢ (stdBasisMatrix i j c * stdBasisMatrix j k d) a b = stdBasisMatrix i k (c * d) a b
tactic: ext a b
state_before: case a
l : Type u_1
m : Type u_2
n : Type u_3
R : Type u_4
α : Type u_5
inst✝⁴ : DecidableEq l
inst✝³ : DecidableEq m
inst✝² : DecidableEq n
inst✝¹ : Semiring α
i j : n
c : α
i' j' : n
inst✝ : Fintype n
k : n
d : α
a b : n
⊢ (stdBasisMatrix i j c * stdBasisMatrix j k d) a b = stdBasisMatrix i k (c * d) a b
state_after: case a
l : Type u_1
m : Type u_2
n : Type u_3
R : Type u_4
α : Type u_5
inst✝⁴ : DecidableEq l
inst✝³ : DecidableEq m
inst✝² : DecidableEq n
inst✝¹ : Semiring α
i j : n
c : α
i' j' : n
inst✝ : Fintype n
k : n
d : α
a b : n
⊢ (∑ x : n, (if i = a ∧ j = x then c else 0) * if j = x ∧ k = b then d else 0) = if i = a ∧ k = b then c * d else 0
tactic: simp only [mul_apply, stdBasisMatrix, boole_mul]
state_before: case a
l : Type u_1
m : Type u_2
n : Type u_3
R : Type u_4
α : Type u_5
inst✝⁴ : DecidableEq l
inst✝³ : DecidableEq m
inst✝² : DecidableEq n
inst✝¹ : Semiring α
i j : n
c : α
i' j' : n
inst✝ : Fintype n
k : n
d : α
a b : n
⊢ (∑ x : n, (if i = a ∧ j = x then c else 0) * if j = x ∧ k = b then d else 0) = if i = a ∧ k = b then c * d else 0
state_after: no goals
tactic: by_cases h₁ : i = a <;> by_cases h₂ : k = b <;> simp [h₁, h₂]
Theorem: Real.sign_zero
File: Mathlib/Data/Real/Sign.lean

Proof steps:
state_before: ⊢ sign 0 = 0
state_after: no goals
tactic: rw [sign, if_neg (lt_irrefl _), if_neg (lt_irrefl _)]
Theorem: MeasureTheory.integrableOn_singleton_iff
File: Mathlib/MeasureTheory/Integral/IntegrableOn.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
x : α
inst✝ : MeasurableSingletonClass α
⊢ IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ⊤
state_after: α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
x : α
inst✝ : MeasurableSingletonClass α
this : f =ᶠ[ae (μ.restrict {x})] fun x_1 => f x
⊢ IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ⊤
tactic: have : f =ᵐ[μ.restrict {x}] fun _ => f x := by
    filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha
    simp only [mem_singleton_iff.1 ha]
state_before: α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
x : α
inst✝ : MeasurableSingletonClass α
this : f =ᶠ[ae (μ.restrict {x})] fun x_1 => f x
⊢ IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ⊤
state_after: α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
x : α
inst✝ : MeasurableSingletonClass α
this : f =ᶠ[ae (μ.restrict {x})] fun x_1 => f x
⊢ f x = 0 ∨ (μ.restrict {x}) univ < ⊤ ↔ f x = 0 ∨ μ {x} < ⊤
tactic: rw [IntegrableOn, integrable_congr this, integrable_const_iff]
state_before: α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
x : α
inst✝ : MeasurableSingletonClass α
this : f =ᶠ[ae (μ.restrict {x})] fun x_1 => f x
⊢ f x = 0 ∨ (μ.restrict {x}) univ < ⊤ ↔ f x = 0 ∨ μ {x} < ⊤
state_after: no goals
tactic: simp
Theorem: Real.rpow_le_one_iff_of_pos
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

Proof steps:
state_before: x y z : ℝ
n : ℕ
hx : 0 < x
⊢ x ^ y ≤ 1 ↔ 1 ≤ x ∧ y ≤ 0 ∨ x ≤ 1 ∧ 0 ≤ y
state_after: no goals
tactic: rw [rpow_def_of_pos hx, exp_le_one_iff, mul_nonpos_iff, log_nonneg_iff hx, log_nonpos_iff hx]
Theorem: CategoryTheory.LaxMonoidalFunctor.prod'_μ
File: Mathlib/CategoryTheory/Monoidal/Functor.lean

Proof steps:
state_before: C : Type u₁
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : MonoidalCategory C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
inst✝² : MonoidalCategory D
E : Type u₃
inst✝¹ : Category.{v₃, u₃} E
inst✝ : MonoidalCategory E
F : LaxMonoidalFunctor C D
G : LaxMonoidalFunctor C E
X Y : C
⊢ (F.prod' G).μ X Y = (F.μ X Y, G.μ X Y)
state_after: C : Type u₁
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : MonoidalCategory C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
inst✝² : MonoidalCategory D
E : Type u₃
inst✝¹ : Category.{v₃, u₃} E
inst✝ : MonoidalCategory E
F : LaxMonoidalFunctor C D
G : LaxMonoidalFunctor C E
X Y : C
⊢ (F.μ X Y ≫ F.map (𝟙 (X ⊗ Y)), G.μ X Y ≫ G.map (𝟙 (X ⊗ Y))) = (F.μ X Y, G.μ X Y)
tactic: dsimp [prod']
state_before: C : Type u₁
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : MonoidalCategory C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
inst✝² : MonoidalCategory D
E : Type u₃
inst✝¹ : Category.{v₃, u₃} E
inst✝ : MonoidalCategory E
F : LaxMonoidalFunctor C D
G : LaxMonoidalFunctor C E
X Y : C
⊢ (F.μ X Y ≫ F.map (𝟙 (X ⊗ Y)), G.μ X Y ≫ G.map (𝟙 (X ⊗ Y))) = (F.μ X Y, G.μ X Y)
state_after: no goals
tactic: simp
Theorem: Dense.diff_finite
File: Mathlib/Topology/Separation.lean

Proof steps:
state_before: X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : T1Space X
inst✝ : ∀ (x : X), (𝓝[≠] x).NeBot
s : Set X
hs : Dense s
t : Set X
ht : t.Finite
⊢ Dense (s \ t)
state_after: case h.e'_3.h.e'_4
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : T1Space X
inst✝ : ∀ (x : X), (𝓝[≠] x).NeBot
s : Set X
hs : Dense s
t : Set X
ht : t.Finite
⊢ t = ↑ht.toFinset
tactic: convert hs.diff_finset ht.toFinset
state_before: case h.e'_3.h.e'_4
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : T1Space X
inst✝ : ∀ (x : X), (𝓝[≠] x).NeBot
s : Set X
hs : Dense s
t : Set X
ht : t.Finite
⊢ t = ↑ht.toFinset
state_after: no goals
tactic: exact (Finite.coe_toFinset _).symm
Theorem: MeasureTheory.integral_eq_integral_pos_part_sub_integral_neg_part
File: Mathlib/MeasureTheory/Integral/Bochner.lean

Proof steps:
state_before: α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ
hf : Integrable f μ
⊢ ∫ (a : α), f a ∂μ = ∫ (a : α), ↑(f a).toNNReal ∂μ - ∫ (a : α), ↑(-f a).toNNReal ∂μ
state_after: α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ
hf : Integrable f μ
⊢ ∫ (a : α), f a ∂μ = ∫ (a : α), ↑(f a).toNNReal - ↑(-f a).toNNReal ∂μ

α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ
hf : Integrable f μ
⊢ Integrable (fun a => ↑(-f a).toNNReal) μ
tactic: rw [← integral_sub hf.real_toNNReal]
Theorem: List.formPerm_cons_concat_apply_last
File: Mathlib/GroupTheory/Perm/List.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
l : List α
x✝ x y : α
xs : List α
⊢ (x :: (xs ++ [y])).formPerm y = x
state_after: case nil
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
l : List α
x✝ x y : α
⊢ (x :: ([] ++ [y])).formPerm y = x

case cons
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
l : List α
x✝ z : α
xs : List α
IH : ∀ (x y : α), (x :: (xs ++ [y])).formPerm y = x
x y : α
⊢ (x :: (z :: xs ++ [y])).formPerm y = x
tactic: induction' xs with z xs IH generalizing x y
Theorem: SimpleGraph.Walk.IsPath.of_cons
File: Mathlib/Combinatorics/SimpleGraph/Path.lean

Proof steps:
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u✝ v✝ w✝ u v w : V
h : G.Adj u v
p : G.Walk v w
⊢ (cons h p).IsPath → p.IsPath
state_after: no goals
tactic: simp [isPath_def]
Theorem: himp_himp
File: Mathlib/Order/Heyting/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : GeneralizedHeytingAlgebra α
a✝ b✝ c✝ d✝ a b c d : α
⊢ d ≤ a ⇨ b ⇨ c ↔ d ≤ a ⊓ b ⇨ c
state_after: no goals
tactic: simp_rw [le_himp_iff, inf_assoc]
Theorem: antivary_iff_mul_rearrangement
File: Mathlib/Algebra/Order/Monovary.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedRing α
f g : ι → α
s : Set ι
a b c d : α
⊢ Antivary f g ↔ ∀ (i j : ι), f i * g i + f j * g j ≤ f i * g j + f j * g i
state_after: no goals
tactic: simp only [smul_eq_mul, antivary_iff_smul_rearrangement]
Theorem: legendreSym.eq_zero_mod_of_eq_neg_one
File: Mathlib/NumberTheory/LegendreSymbol/Basic.lean

Proof steps:
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ℤ
h : legendreSym p a = -1
x y : ZMod p
hxy : x ^ 2 - ↑a * y ^ 2 = 0
⊢ x = 0 ∧ y = 0
state_after: p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ℤ
h : legendreSym p a = -1
x y : ZMod p
hxy : x ^ 2 - ↑a * y ^ 2 = 0
ha : ↑a ≠ 0
⊢ x = 0 ∧ y = 0
tactic: have ha : (a : ZMod p) ≠ 0 := by
    intro hf
    rw [(eq_zero_iff p a).mpr hf] at h
    simp at h
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ℤ
h : legendreSym p a = -1
x y : ZMod p
hxy : x ^ 2 - ↑a * y ^ 2 = 0
ha : ↑a ≠ 0
⊢ x = 0 ∧ y = 0
state_after: p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ℤ
h : legendreSym p a = -1
x y : ZMod p
hxy : x ^ 2 - ↑a * y ^ 2 = 0
ha : ↑a ≠ 0
hf : ¬(x = 0 ∧ y = 0)
⊢ False
tactic: by_contra hf
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ℤ
h : legendreSym p a = -1
x y : ZMod p
hxy : x ^ 2 - ↑a * y ^ 2 = 0
ha : ↑a ≠ 0
hf : ¬(x = 0 ∧ y = 0)
⊢ False
state_after: case inl
p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ℤ
h : legendreSym p a = -1
x y : ZMod p
hxy : x ^ 2 - ↑a * y ^ 2 = 0
ha : ↑a ≠ 0
hf : ¬(x = 0 ∧ y = 0)
hx : ¬x = 0
⊢ False

case inr
p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ℤ
h : legendreSym p a = -1
x y : ZMod p
hxy : x ^ 2 - ↑a * y ^ 2 = 0
ha : ↑a ≠ 0
hf : ¬(x = 0 ∧ y = 0)
hy : ¬y = 0
⊢ False
tactic: cases' imp_iff_or_not.mp (not_and'.mp hf) with hx hy
Theorem: Path.Homotopic.comp_prod_eq_prod_comp
File: Mathlib/Topology/Homotopy/Product.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
a₁ a₂ a₃ : α
b₁ b₂ b₃ : β
p₁ p₁' : Path a₁ a₂
p₂ p₂' : Path b₁ b₂
q₁ : Homotopic.Quotient a₁ a₂
q₂ : Homotopic.Quotient b₁ b₂
r₁ : Homotopic.Quotient a₂ a₃
r₂ : Homotopic.Quotient b₂ b₃
⊢ prod q₁ q₂ ⬝ prod r₁ r₂ = prod (q₁ ⬝ r₁) (q₂ ⬝ r₂)
state_after: case h
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
a₁ a₂ a₃ : α
b₁ b₂ b₃ : β
p₁ p₁' : Path a₁ a₂
p₂ p₂' : Path b₁ b₂
q₁ : Homotopic.Quotient a₁ a₂
q₂ : Homotopic.Quotient b₁ b₂
r₁ : Homotopic.Quotient a₂ a₃
r₂ : Homotopic.Quotient b₂ b₃
a✝ : Path a₁ a₂
b✝ : Path b₁ b₂
⊢ prod ⟦a✝⟧ ⟦b✝⟧ ⬝ prod r₁ r₂ = prod (⟦a✝⟧ ⬝ r₁) (⟦b✝⟧ ⬝ r₂)
tactic: induction q₁, q₂ using Quotient.inductionOn₂
state_before: case h
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
a₁ a₂ a₃ : α
b₁ b₂ b₃ : β
p₁ p₁' : Path a₁ a₂
p₂ p₂' : Path b₁ b₂
q₁ : Homotopic.Quotient a₁ a₂
q₂ : Homotopic.Quotient b₁ b₂
r₁ : Homotopic.Quotient a₂ a₃
r₂ : Homotopic.Quotient b₂ b₃
a✝ : Path a₁ a₂
b✝ : Path b₁ b₂
⊢ prod ⟦a✝⟧ ⟦b✝⟧ ⬝ prod r₁ r₂ = prod (⟦a✝⟧ ⬝ r₁) (⟦b✝⟧ ⬝ r₂)
state_after: case h.h
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
a₁ a₂ a₃ : α
b₁ b₂ b₃ : β
p₁ p₁' : Path a₁ a₂
p₂ p₂' : Path b₁ b₂
q₁ : Homotopic.Quotient a₁ a₂
q₂ : Homotopic.Quotient b₁ b₂
r₁ : Homotopic.Quotient a₂ a₃
r₂ : Homotopic.Quotient b₂ b₃
a✝¹ : Path a₁ a₂
b✝¹ : Path b₁ b₂
a✝ : Path a₂ a₃
b✝ : Path b₂ b₃
⊢ prod ⟦a✝¹⟧ ⟦b✝¹⟧ ⬝ prod ⟦a✝⟧ ⟦b✝⟧ = prod (⟦a✝¹⟧ ⬝ ⟦a✝⟧) (⟦b✝¹⟧ ⬝ ⟦b✝⟧)
tactic: induction r₁, r₂ using Quotient.inductionOn₂
state_before: case h.h
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
a₁ a₂ a₃ : α
b₁ b₂ b₃ : β
p₁ p₁' : Path a₁ a₂
p₂ p₂' : Path b₁ b₂
q₁ : Homotopic.Quotient a₁ a₂
q₂ : Homotopic.Quotient b₁ b₂
r₁ : Homotopic.Quotient a₂ a₃
r₂ : Homotopic.Quotient b₂ b₃
a✝¹ : Path a₁ a₂
b✝¹ : Path b₁ b₂
a✝ : Path a₂ a₃
b✝ : Path b₂ b₃
⊢ prod ⟦a✝¹⟧ ⟦b✝¹⟧ ⬝ prod ⟦a✝⟧ ⟦b✝⟧ = prod (⟦a✝¹⟧ ⬝ ⟦a✝⟧) (⟦b✝¹⟧ ⬝ ⟦b✝⟧)
state_after: no goals
tactic: simp only [prod_lift, ← Path.Homotopic.comp_lift, Path.trans_prod_eq_prod_trans]
Theorem: exists_addOrderOf_eq_prime_pow_iff
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)
x✝ : ∃ k, orderOf x = p ^ k
k : ℕ
hk : orderOf x = p ^ k
⊢ x ^ p ^ k = 1
state_after: no goals
tactic: rw [← hk, pow_orderOf_eq_one]
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)
x✝ : ∃ m, x ^ p ^ m = 1
w✝ : ℕ
hm : x ^ p ^ w✝ = 1
⊢ ∃ k, orderOf x = p ^ k
state_after: case intro.intro
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)
x✝ : ∃ m, x ^ p ^ m = 1
w✝ : ℕ
hm : x ^ p ^ w✝ = 1
k : ℕ
left✝ : k ≤ w✝
hk : orderOf x = p ^ k
⊢ ∃ k, orderOf x = p ^ k
tactic: obtain ⟨k, _, hk⟩ := (Nat.dvd_prime_pow hp.elim).mp (orderOf_dvd_of_pow_eq_one hm)
state_before: case intro.intro
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)
x✝ : ∃ m, x ^ p ^ m = 1
w✝ : ℕ
hm : x ^ p ^ w✝ = 1
k : ℕ
left✝ : k ≤ w✝
hk : orderOf x = p ^ k
⊢ ∃ k, orderOf x = p ^ k
state_after: no goals
tactic: exact ⟨k, hk⟩
Theorem: exists_seq_of_forall_finset_exists
File: Mathlib/Data/Fintype/Basic.lean

Proof steps:
state_before: α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
P : α → Prop
r : α → α → Prop
h : ∀ (s : Finset α), (∀ x ∈ s, P x) → ∃ y, P y ∧ ∀ x ∈ s, r x y
⊢ ∃ f, (∀ (n : ℕ), P (f n)) ∧ ∀ (m n : ℕ), m < n → r (f m) (f n)
state_after: no goals
tactic: classical
    have : Nonempty α := by
      rcases h ∅ (by simp) with ⟨y, _⟩
      exact ⟨y⟩
    choose! F hF using h
    have h' : ∀ s : Finset α, ∃ y, (∀ x ∈ s, P x) → P y ∧ ∀ x ∈ s, r x y := fun s => ⟨F s, hF s⟩
    set f := seqOfForallFinsetExistsAux P r h' with hf
    have A : ∀ n : ℕ, P (f n) := by
      intro n
      induction' n using Nat.strong_induction_on with n IH
      have IH' : ∀ x : Fin n, P (f x) := fun n => IH n.1 n.2
      rw [hf, seqOfForallFinsetExistsAux]
      exact
        (Classical.choose_spec
            (h' (Finset.image (fun i : Fin n => f i) (Finset.univ : Finset (Fin n))))
            (by simp [IH'])).1
    refine ⟨f, A, fun m n hmn => ?_⟩
    conv_rhs => rw [hf]
    rw [seqOfForallFinsetExistsAux]
    apply
      (Classical.choose_spec
          (h' (Finset.image (fun i : Fin n => f i) (Finset.univ : Finset (Fin n)))) (by simp [A])).2
    exact Finset.mem_image.2 ⟨⟨m, hmn⟩, Finset.mem_univ _, rfl⟩
Theorem: CategoryTheory.Functor.punitExt_hom_app_down_down
File: Mathlib/CategoryTheory/PUnit.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
F G : C ⥤ Discrete PUnit.{w + 1}
X : C
⊢ F.obj X = G.obj X
state_after: no goals
tactic: simp only [eq_iff_true_of_subsingleton]
Theorem: ProbabilityTheory.IndepSets_iff
File: Mathlib/Probability/Independence/Basic.lean

Proof steps:
state_before: Ω : Type u_1
ι : Type u_2
β : Type u_3
γ : Type u_4
κ : ι → Type u_5
π : ι → Set (Set Ω)
m : ι → MeasurableSpace Ω
x✝ : MeasurableSpace Ω
μ✝ : Measure Ω
S : Finset ι
s : ι → Set Ω
s1 s2 : Set (Set Ω)
μ : Measure Ω
⊢ IndepSets s1 s2 μ ↔ ∀ (t1 t2 : Set Ω), t1 ∈ s1 → t2 ∈ s2 → μ (t1 ∩ t2) = μ t1 * μ t2
state_after: no goals
tactic: simp only [IndepSets, Kernel.IndepSets, ae_dirac_eq, Filter.eventually_pure, Kernel.const_apply]
Theorem: MeasureTheory.FiniteMeasure.tendsto_iff_forall_testAgainstNN_tendsto
File: Mathlib/MeasureTheory/Measure/FiniteMeasure.lean

Proof steps:
state_before: Ω : Type u_1
inst✝⁶ : MeasurableSpace Ω
R : Type u_2
inst✝⁵ : SMul R ℝ≥0
inst✝⁴ : SMul R ℝ≥0∞
inst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞
inst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_3
F : Filter γ
μs : γ → FiniteMeasure Ω
μ : FiniteMeasure Ω
⊢ Tendsto μs F (𝓝 μ) ↔ ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => (μs i).testAgainstNN f) F (𝓝 (μ.testAgainstNN f))
state_after: Ω : Type u_1
inst✝⁶ : MeasurableSpace Ω
R : Type u_2
inst✝⁵ : SMul R ℝ≥0
inst✝⁴ : SMul R ℝ≥0∞
inst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞
inst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_3
F : Filter γ
μs : γ → FiniteMeasure Ω
μ : FiniteMeasure Ω
⊢ (∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => (μs i).toWeakDualBCNN f) F (𝓝 (μ.toWeakDualBCNN f))) ↔
    ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => (μs i).testAgainstNN f) F (𝓝 (μ.testAgainstNN f))
tactic: rw [FiniteMeasure.tendsto_iff_forall_toWeakDualBCNN_tendsto]
state_before: Ω : Type u_1
inst✝⁶ : MeasurableSpace Ω
R : Type u_2
inst✝⁵ : SMul R ℝ≥0
inst✝⁴ : SMul R ℝ≥0∞
inst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞
inst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_3
F : Filter γ
μs : γ → FiniteMeasure Ω
μ : FiniteMeasure Ω
⊢ (∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => (μs i).toWeakDualBCNN f) F (𝓝 (μ.toWeakDualBCNN f))) ↔
    ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => (μs i).testAgainstNN f) F (𝓝 (μ.testAgainstNN f))
state_after: no goals
tactic: rfl
Theorem: Finset.attach_map_val
File: Mathlib/Data/Finset/Image.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f : α ↪ β
s✝ s : Finset α
⊢ (map (Embedding.subtype fun x => x ∈ s) s.attach).val = s.val
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
f : α ↪ β
s✝ s : Finset α
⊢ Multiset.map (⇑(Embedding.subtype fun x => x ∈ s)) s.val.attach = s.val
tactic: rw [map_val, attach_val]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f : α ↪ β
s✝ s : Finset α
⊢ Multiset.map (⇑(Embedding.subtype fun x => x ∈ s)) s.val.attach = s.val
state_after: no goals
tactic: exact Multiset.attach_map_val _
Theorem: Finsupp.span_eq_range_total
File: Mathlib/LinearAlgebra/Finsupp.lean

Proof steps:
state_before: α : Type u_1
M : Type u_2
N : Type u_3
P : Type u_4
R : Type u_5
S : Type u_6
inst✝⁹ : Semiring R
inst✝⁸ : Semiring S
inst✝⁷ : AddCommMonoid M
inst✝⁶ : Module R M
inst✝⁵ : AddCommMonoid N
inst✝⁴ : Module R N
inst✝³ : AddCommMonoid P
inst✝² : Module R P
α' : Type u_7
M' : Type u_8
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
v : α → M
v' : α' → M'
s : Set M
⊢ span R s = LinearMap.range (Finsupp.total (↑s) M R Subtype.val)
state_after: no goals
tactic: rw [range_total, Subtype.range_coe_subtype, Set.setOf_mem_eq]
Theorem: ENNReal.rpow_lt_one
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

Proof steps:
state_before: x : ℝ≥0∞
z : ℝ
hx : x < 1
hz : 0 < z
⊢ x ^ z < 1
state_after: case intro
z : ℝ
hz : 0 < z
x : ℝ≥0
hx : ↑x < 1
⊢ ↑x ^ z < 1
tactic: lift x to ℝ≥0 using ne_of_lt (lt_of_lt_of_le hx le_top)
state_before: case intro
z : ℝ
hz : 0 < z
x : ℝ≥0
hx : ↑x < 1
⊢ ↑x ^ z < 1
state_after: case intro
z : ℝ
hz : 0 < z
x : ℝ≥0
hx : x < 1
⊢ ↑x ^ z < 1
tactic: simp only [coe_lt_one_iff] at hx
state_before: case intro
z : ℝ
hz : 0 < z
x : ℝ≥0
hx : x < 1
⊢ ↑x ^ z < 1
state_after: no goals
tactic: simp [coe_rpow_of_nonneg _ (le_of_lt hz), NNReal.rpow_lt_one hx hz]
Theorem: Stream'.map_append_stream
File: Mathlib/Data/Stream/Init.lean

Proof steps:
state_before: α : Type u
β : Type v
δ : Type w
f : α → β
a : α
l : List α
s : Stream' α
⊢ map f (a :: l ++ₛ s) = List.map f (a :: l) ++ₛ map f s
state_after: no goals
tactic: rw [cons_append_stream, List.map_cons, map_cons, cons_append_stream, map_append_stream f l]
Theorem: SetTheory.Game.bddBelow_range_of_small
File: Mathlib/SetTheory/Game/Basic.lean

Proof steps:
state_before: ι : Type u_1
inst✝ : Small.{u, u_1} ι
f : ι → Game
⊢ BddBelow (Set.range f)
state_after: case intro
ι : Type u_1
inst✝ : Small.{u, u_1} ι
f : ι → Game
x : PGame
hx : x ∈ lowerBounds (Set.range (Quotient.out ∘ f))
⊢ BddBelow (Set.range f)
tactic: obtain ⟨x, hx⟩ := PGame.bddBelow_range_of_small (Quotient.out ∘ f)
state_before: case intro
ι : Type u_1
inst✝ : Small.{u, u_1} ι
f : ι → Game
x : PGame
hx : x ∈ lowerBounds (Set.range (Quotient.out ∘ f))
⊢ BddBelow (Set.range f)
state_after: case intro
ι : Type u_1
inst✝ : Small.{u, u_1} ι
f : ι → Game
x : PGame
hx : x ∈ lowerBounds (Set.range (Quotient.out ∘ f))
i : ι
⊢ ⟦x⟧ ≤ f i
tactic: refine ⟨⟦x⟧, Set.forall_mem_range.2 fun i ↦ ?_⟩
state_before: case intro
ι : Type u_1
inst✝ : Small.{u, u_1} ι
f : ι → Game
x : PGame
hx : x ∈ lowerBounds (Set.range (Quotient.out ∘ f))
i : ι
⊢ ⟦x⟧ ≤ f i
state_after: no goals
tactic: simpa [PGame.le_iff_game_le] using hx $ Set.mem_range_self i
Theorem: mul_left_eq_iff_eq_invOf_mul
File: Mathlib/Algebra/Group/Invertible/Defs.lean

Proof steps:
state_before: α : Type u
inst✝¹ : Monoid α
a b c : α
inst✝ : Invertible c
⊢ c * a = b ↔ a = ⅟c * b
state_after: no goals
tactic: rw [← mul_left_inj_of_invertible (c := ⅟c), invOf_mul_self_assoc]
Theorem: CauSeq.neg_limZero
File: Mathlib/Algebra/Order/CauSeq/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f : CauSeq β abv
hf : f.LimZero
⊢ (-f).LimZero
state_after: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f : CauSeq β abv
hf : f.LimZero
⊢ (-1 * f).LimZero
tactic: rw [← neg_one_mul f]
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f : CauSeq β abv
hf : f.LimZero
⊢ (-1 * f).LimZero
state_after: no goals
tactic: exact mul_limZero_right _ hf
Theorem: Set.one_le_encard_iff_nonempty
File: Mathlib/Data/Set/Card.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
s t : Set α
⊢ 1 ≤ s.encard ↔ s.Nonempty
state_after: no goals
tactic: rw [nonempty_iff_ne_empty, Ne, ← encard_eq_zero, ENat.one_le_iff_ne_zero]
Theorem: Set.eq_of_not_mem_uIoc_of_not_mem_uIoc
File: Mathlib/Order/Interval/Set/UnorderedInterval.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a a₁ a₂ b b₁ b₂ c d x : α
ha : a ≤ c
hb : b ≤ c
⊢ a ∉ Ι b c → b ∉ Ι a c → a = b
state_after: α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a a₁ a₂ b b₁ b₂ c d x : α
ha : a ≤ c
hb : b ≤ c
⊢ a ≤ b ∧ a ≤ c ∨ c < a ∧ b < a → b ≤ a ∧ b ≤ c ∨ c < b ∧ a < b → a = b
tactic: simp_rw [not_mem_uIoc]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a a₁ a₂ b b₁ b₂ c d x : α
ha : a ≤ c
hb : b ≤ c
⊢ a ≤ b ∧ a ≤ c ∨ c < a ∧ b < a → b ≤ a ∧ b ≤ c ∨ c < b ∧ a < b → a = b
state_after: no goals
tactic: rintro (⟨_, _⟩ | ⟨_, _⟩) (⟨_, _⟩ | ⟨_, _⟩) <;>
      apply le_antisymm <;>
    first |assumption|exact le_of_lt ‹_›|
    exact absurd hb (not_le_of_lt ‹c < b›)|exact absurd ha (not_le_of_lt ‹c < a›)