ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: IsPrimitiveRoot.prime_norm_toInteger_sub_one_of_prime_ne_two
File: Mathlib/NumberTheory/Cyclotomic/Rat.lean

Proof steps:
state_before: p : ℕ+
k : ℕ
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
hcycl : IsCyclotomicExtension {p ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))
hodd : p ≠ 2
⊢ Prime ((Algebra.norm ℤ) (hζ.toInteger - 1))
state_after: p : ℕ+
k : ℕ
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
hcycl : IsCyclotomicExtension {p ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))
hodd : p ≠ 2
this : (Algebra.norm ℤ) (hζ.toInteger - 1) = ↑↑p
⊢ Prime ((Algebra.norm ℤ) (hζ.toInteger - 1))
tactic: have := hζ.norm_toInteger_sub_one_of_prime_ne_two hodd
state_before: p : ℕ+
k : ℕ
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
hcycl : IsCyclotomicExtension {p ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))
hodd : p ≠ 2
this : (Algebra.norm ℤ) (hζ.toInteger - 1) = ↑↑p
⊢ Prime ((Algebra.norm ℤ) (hζ.toInteger - 1))
state_after: p : ℕ+
k : ℕ
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
hcycl : IsCyclotomicExtension {p ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))
hodd : p ≠ 2
this : (Algebra.norm ℤ) (hζ.toInteger - 1) = ↑↑p
⊢ Prime ↑↑p
tactic: rw [this]
state_before: p : ℕ+
k : ℕ
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
hcycl : IsCyclotomicExtension {p ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))
hodd : p ≠ 2
this : (Algebra.norm ℤ) (hζ.toInteger - 1) = ↑↑p
⊢ Prime ↑↑p
state_after: no goals
tactic: exact Nat.prime_iff_prime_int.1 hp.out
Theorem: CategoryTheory.MonoOver.mapIso_inverse
File: Mathlib/CategoryTheory/Subobject/MonoOver.lean

Proof steps:
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
X Y Z : C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
A B : C
e : A ≅ B
⊢ map (e.hom ≫ e.inv) = map (𝟙 A)
state_after: no goals
tactic: simp
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
X Y Z : C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
A B : C
e : A ≅ B
⊢ map (e.inv ≫ e.hom) = map (𝟙 B)
state_after: no goals
tactic: simp
Theorem: HasProd.of_nat_of_neg_add_one
File: Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean

Proof steps:
state_before: M : Type u_1
inst✝³ : CommMonoid M
inst✝² : TopologicalSpace M
m m' : M
G : Type u_2
inst✝¹ : CommGroup G
g g' : G
inst✝ : ContinuousMul M
f : ℤ → M
hf₁ : HasProd (fun n => f ↑n) m
hf₂ : HasProd (fun n => f (-(↑n + 1))) m'
⊢ HasProd f (m * m')
state_after: M : Type u_1
inst✝³ : CommMonoid M
inst✝² : TopologicalSpace M
m m' : M
G : Type u_2
inst✝¹ : CommGroup G
g g' : G
inst✝ : ContinuousMul M
f : ℤ → M
hf₁ : HasProd (fun n => f ↑n) m
hf₂ : HasProd (fun n => f (-(↑n + 1))) m'
hi₂ : Injective Int.negSucc
⊢ HasProd f (m * m')
tactic: have hi₂ : Injective Int.negSucc := @Int.negSucc.inj
state_before: M : Type u_1
inst✝³ : CommMonoid M
inst✝² : TopologicalSpace M
m m' : M
G : Type u_2
inst✝¹ : CommGroup G
g g' : G
inst✝ : ContinuousMul M
f : ℤ → M
hf₁ : HasProd (fun n => f ↑n) m
hf₂ : HasProd (fun n => f (-(↑n + 1))) m'
hi₂ : Injective Int.negSucc
this : IsCompl (Set.range Nat.cast) (Set.range Int.negSucc)
⊢ HasProd f (m * m')
state_after: no goals
tactic: exact (Nat.cast_injective.hasProd_range_iff.mpr hf₁).mul_isCompl
    this (hi₂.hasProd_range_iff.mpr hf₂)
Theorem: QuaternionGroup.a_one_pow_n
File: Mathlib/GroupTheory/SpecificGroups/Quaternion.lean

Proof steps:
state_before: n : ℕ
⊢ a 1 ^ (2 * n) = 1
state_after: n : ℕ
⊢ a ↑(2 * n) = a 0
tactic: rw [a_one_pow, one_def]
state_before: n : ℕ
⊢ a ↑(2 * n) = a 0
state_after: case e_a
n : ℕ
⊢ ↑(2 * n) = 0
tactic: congr 1
state_before: case e_a
n : ℕ
⊢ ↑(2 * n) = 0
state_after: no goals
tactic: exact ZMod.natCast_self _
Theorem: FreeGroupBasis.repr_apply_coe
File: Mathlib/GroupTheory/FreeGroup/IsFreeGroup.lean

Proof steps:
state_before: ι : Type u_1
ι' : Type u_2
G : Type u_3
H : Type u_4
inst✝¹ : Group G
inst✝ : Group H
b : FreeGroupBasis ι G
i : ι
⊢ b.repr (b i) = FreeGroup.of i
state_after: ι : Type u_1
ι' : Type u_2
G : Type u_3
H : Type u_4
inst✝¹ : Group G
inst✝ : Group H
b : FreeGroupBasis ι G
i : ι
⊢ b.repr (b.repr.symm (FreeGroup.of i)) = FreeGroup.of i
tactic: change b.repr (b.repr.symm (FreeGroup.of i)) = FreeGroup.of i
state_before: ι : Type u_1
ι' : Type u_2
G : Type u_3
H : Type u_4
inst✝¹ : Group G
inst✝ : Group H
b : FreeGroupBasis ι G
i : ι
⊢ b.repr (b.repr.symm (FreeGroup.of i)) = FreeGroup.of i
state_after: no goals
tactic: simp
Theorem: MeasureTheory.L1.SimpleFunc.integral_eq_lintegral
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✝⁶ : NormedAddCommGroup F
m : MeasurableSpace α
μ : Measure α
inst✝⁵ : NormedField 𝕜
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedSpace ℝ E
inst✝² : SMulCommClass ℝ 𝕜 E
F' : Type u_5
inst✝¹ : NormedAddCommGroup F'
inst✝ : NormedSpace ℝ F'
f : ↥(simpleFunc ℝ 1 μ)
h_pos : 0 ≤ᶠ[ae μ] ↑(toSimpleFunc f)
⊢ integral f = (∫⁻ (a : α), ENNReal.ofReal (↑(toSimpleFunc f) a) ∂μ).toReal
state_after: no goals
tactic: rw [integral, SimpleFunc.integral_eq_lintegral (SimpleFunc.integrable f) h_pos]
Theorem: NumberField.InfinitePlace.isUnramified_iff_stabilizer_eq_bot
File: Mathlib/NumberTheory/NumberField/Embeddings.lean

Proof steps:
state_before: k : Type u_1
inst✝⁸ : Field k
K : Type u_2
inst✝⁷ : Field K
F : Type u_3
inst✝⁶ : Field F
inst✝⁵ : NumberField K
inst✝⁴ : Algebra k K
inst✝³ : Algebra k F
inst✝² : Algebra K F
inst✝¹ : IsScalarTower k K F
σ : K ≃ₐ[k] K
w : InfinitePlace K
inst✝ : IsGalois k K
⊢ IsUnramified k w ↔ Stab w = ⊥
state_after: k : Type u_1
inst✝⁸ : Field k
K : Type u_2
inst✝⁷ : Field K
F : Type u_3
inst✝⁶ : Field F
inst✝⁵ : NumberField K
inst✝⁴ : Algebra k K
inst✝³ : Algebra k F
inst✝² : Algebra K F
inst✝¹ : IsScalarTower k K F
σ : K ≃ₐ[k] K
w : InfinitePlace K
inst✝ : IsGalois k K
⊢ (∀ (σ : K ≃ₐ[k] K), ComplexEmbedding.IsConj w.embedding σ → σ = 1) ↔ Stab (mk w.embedding) = ⊥
tactic: rw [← mk_embedding w, isUnramified_mk_iff_forall_isConj]
state_before: k : Type u_1
inst✝⁸ : Field k
K : Type u_2
inst✝⁷ : Field K
F : Type u_3
inst✝⁶ : Field F
inst✝⁵ : NumberField K
inst✝⁴ : Algebra k K
inst✝³ : Algebra k F
inst✝² : Algebra K F
inst✝¹ : IsScalarTower k K F
σ : K ≃ₐ[k] K
w : InfinitePlace K
inst✝ : IsGalois k K
⊢ (∀ (σ : K ≃ₐ[k] K), ComplexEmbedding.IsConj w.embedding σ → σ = 1) ↔ Stab (mk w.embedding) = ⊥
state_after: no goals
tactic: simp only [eq_bot_iff, SetLike.le_def, mem_stabilizer_mk_iff,
    Subgroup.mem_bot, forall_eq_or_imp, true_and]
Theorem: Real.cos_neg
File: Mathlib/Data/Complex/Exponential.lean

Proof steps:
state_before: x y : ℝ
⊢ cos (-x) = cos x
state_after: no goals
tactic: simp [cos, exp_neg]
Theorem: InnerProductGeometry.angle_sub_eq_arctan_of_inner_eq_zero
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean

Proof steps:
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, y⟫_ℝ = 0
h0 : x ≠ 0
⊢ angle x (x - y) = Real.arctan (‖y‖ / ‖x‖)
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, -y⟫_ℝ = 0
h0 : x ≠ 0
⊢ angle x (x - y) = Real.arctan (‖y‖ / ‖x‖)
tactic: rw [← neg_eq_zero, ← inner_neg_right] at h
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, -y⟫_ℝ = 0
h0 : x ≠ 0
⊢ angle x (x - y) = Real.arctan (‖y‖ / ‖x‖)
state_after: no goals
tactic: rw [sub_eq_add_neg, angle_add_eq_arctan_of_inner_eq_zero h h0, norm_neg]
Theorem: AbsoluteValue.map_units_int
File: Mathlib/Data/Int/AbsoluteValue.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
inst✝¹ : Ring R
inst✝ : LinearOrderedCommRing S
abv : AbsoluteValue ℤ S
x : ℤˣ
⊢ abv ↑x = 1
state_after: no goals
tactic: rcases Int.units_eq_one_or x with (rfl | rfl) <;> simp
Theorem: Polynomial.natDegree_eraseLead_add_one
File: Mathlib/Algebra/Polynomial/EraseLead.lean

Proof steps:
state_before: R : Type u_1
inst✝ : Semiring R
f : R[X]
h : f.nextCoeff ≠ 0
⊢ f.eraseLead.natDegree + 1 = f.natDegree
state_after: R : Type u_1
inst✝ : Semiring R
f : R[X]
h : f.nextCoeff ≠ 0
⊢ 1 ≤ f.natDegree
tactic: rw [natDegree_eraseLead h, tsub_add_cancel_of_le]
state_before: R : Type u_1
inst✝ : Semiring R
f : R[X]
h : f.nextCoeff ≠ 0
⊢ 1 ≤ f.natDegree
state_after: no goals
tactic: exact natDegree_pos_of_nextCoeff_ne_zero h
Theorem: List.foldlM_eq_foldl
File: Mathlib/Data/List/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
m : Type v → Type w
inst✝¹ : Monad m
inst✝ : LawfulMonad m
f : β → α → m β
b : β
l : List α
⊢ List.foldlM f b l =
    foldl
      (fun mb a => do
        let b ← mb
        f b a)
      (pure b) l
state_after: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
m : Type v → Type w
inst✝¹ : Monad m
inst✝ : LawfulMonad m
f : β → α → m β
b : β
l : List α
⊢ ∀ (mb : m β),
    (do
        let b ← mb
        List.foldlM f b l) =
      foldl
        (fun mb a => do
          let b ← mb
          f b a)
        mb l
tactic: suffices h :
    ∀ mb : m β, (mb >>= fun b => List.foldlM f b l) = foldl (fun mb a => mb >>= fun b => f b a) mb l
    by simp [← h (pure b)]
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
m : Type v → Type w
inst✝¹ : Monad m
inst✝ : LawfulMonad m
f : β → α → m β
b : β
l : List α
⊢ ∀ (mb : m β),
    (do
        let b ← mb
        List.foldlM f b l) =
      foldl
        (fun mb a => do
          let b ← mb
          f b a)
        mb l
state_after: no goals
tactic: induction l with
  | nil => intro; simp
  | cons _ _ l_ih => intro; simp only [List.foldlM, foldl, ← l_ih, functor_norm]
Theorem: dimH_range_le_of_locally_holder_on
File: Mathlib/Topology/MetricSpace/HausdorffDimension.lean

Proof steps:
state_before: ι : Type u_1
X : Type u_2
Y : Type u_3
inst✝² : EMetricSpace X
inst✝¹ : EMetricSpace Y
C K r✝ : ℝ≥0
f✝ : X → Y
s t : Set X
inst✝ : SecondCountableTopology X
r : ℝ≥0
f : X → Y
hr : 0 < r
hf : ∀ (x : X), ∃ C, ∃ s ∈ 𝓝 x, HolderOnWith C r f s
⊢ dimH (range f) ≤ dimH univ / ↑r
state_after: ι : Type u_1
X : Type u_2
Y : Type u_3
inst✝² : EMetricSpace X
inst✝¹ : EMetricSpace Y
C K r✝ : ℝ≥0
f✝ : X → Y
s t : Set X
inst✝ : SecondCountableTopology X
r : ℝ≥0
f : X → Y
hr : 0 < r
hf : ∀ (x : X), ∃ C, ∃ s ∈ 𝓝 x, HolderOnWith C r f s
⊢ dimH (f '' univ) ≤ dimH univ / ↑r
tactic: rw [← image_univ]
state_before: ι : Type u_1
X : Type u_2
Y : Type u_3
inst✝² : EMetricSpace X
inst✝¹ : EMetricSpace Y
C K r✝ : ℝ≥0
f✝ : X → Y
s t : Set X
inst✝ : SecondCountableTopology X
r : ℝ≥0
f : X → Y
hr : 0 < r
hf : ∀ (x : X), ∃ C, ∃ s ∈ 𝓝 x, HolderOnWith C r f s
⊢ dimH (f '' univ) ≤ dimH univ / ↑r
state_after: ι : Type u_1
X : Type u_2
Y : Type u_3
inst✝² : EMetricSpace X
inst✝¹ : EMetricSpace Y
C K r✝ : ℝ≥0
f✝ : X → Y
s t : Set X
inst✝ : SecondCountableTopology X
r : ℝ≥0
f : X → Y
hr : 0 < r
hf : ∀ (x : X), ∃ C, ∃ s ∈ 𝓝 x, HolderOnWith C r f s
x : X
x✝ : x ∈ univ
⊢ ∃ C, ∃ t ∈ 𝓝[univ] x, HolderOnWith C r f t
tactic: refine dimH_image_le_of_locally_holder_on hr fun x _ => ?_
state_before: ι : Type u_1
X : Type u_2
Y : Type u_3
inst✝² : EMetricSpace X
inst✝¹ : EMetricSpace Y
C K r✝ : ℝ≥0
f✝ : X → Y
s t : Set X
inst✝ : SecondCountableTopology X
r : ℝ≥0
f : X → Y
hr : 0 < r
hf : ∀ (x : X), ∃ C, ∃ s ∈ 𝓝 x, HolderOnWith C r f s
x : X
x✝ : x ∈ univ
⊢ ∃ C, ∃ t ∈ 𝓝[univ] x, HolderOnWith C r f t
state_after: no goals
tactic: simpa only [exists_prop, nhdsWithin_univ] using hf x
Theorem: CategoryTheory.MonoidalCategory.tensor_whiskerLeft_symm
File: Mathlib/CategoryTheory/Monoidal/Category.lean

Proof steps:
state_before: C✝ : Type u
𝒞 : Category.{v, u} C✝
inst✝² : MonoidalCategory C✝
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : MonoidalCategory C
U V W X✝ Y✝ Z✝ X Y Z Z' : C
f : Z ⟶ Z'
⊢ X ◁ Y ◁ f = (α_ X Y Z).inv ≫ (X ⊗ Y) ◁ f ≫ (α_ X Y Z').hom
state_after: no goals
tactic: simp
Theorem: Set.biUnion_finsetSigma_univ
File: Mathlib/Data/Fintype/Sigma.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
κ : ι → Type u_5
inst✝ : (i : ι) → Fintype (κ i)
s : Finset ι
f : Sigma κ → Set α
⊢ ⋃ ij ∈ s.sigma fun x => Finset.univ, f ij = ⋃ i ∈ s, ⋃ j, f ⟨i, j⟩
state_after: no goals
tactic: aesop
Theorem: PMF.toMeasure_pure
File: Mathlib/Probability/ProbabilityMassFunction/Monad.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
a a' : α
s✝ : Set α
inst✝ : MeasurableSpace α
s : Set α
hs : MeasurableSet s
⊢ (pure a).toMeasure s = (Measure.dirac a) s
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
a a' : α
s✝ : Set α
inst✝ : MeasurableSpace α
s : Set α
hs : MeasurableSet s
⊢ (if a ∈ s then 1 else 0) = s.indicator 1 a
tactic: rw [toMeasure_pure_apply a s hs, Measure.dirac_apply' a hs]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
a a' : α
s✝ : Set α
inst✝ : MeasurableSpace α
s : Set α
hs : MeasurableSet s
⊢ (if a ∈ s then 1 else 0) = s.indicator 1 a
state_after: no goals
tactic: rfl
Theorem: Mathlib.Vector.mapAccumr₂_mapAccumr_left
File: Mathlib/Data/Vector/MapLemmas.lean

Proof steps:
state_before: α : Type
n : ℕ
β : Type
xs : Vector α n
ys : Vector β n
γ σ₁ ζ σ₂ : Type
s₂ : σ₂
s₁ : σ₁
f₁ : γ → β → σ₁ → σ₁ × ζ
f₂ : α → σ₂ → σ₂ × γ
⊢ mapAccumr₂ f₁ (mapAccumr f₂ xs s₂).2 ys s₁ =
    let m :=
      mapAccumr₂
        (fun x y s =>
          let r₂ := f₂ x s.2;
          let r₁ := f₁ r₂.2 y s.1;
          ((r₁.1, r₂.1), r₁.2))
        xs ys (s₁, s₂);
    (m.1.1, m.2)
state_after: no goals
tactic: induction xs, ys using Vector.revInductionOn₂ generalizing s₁ s₂ <;> simp_all
Theorem: integral_coe_re_add_coe_im
File: Mathlib/MeasureTheory/Integral/SetIntegral.lean

Proof steps:
state_before: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝⁵ : MeasurableSpace X
μ : Measure X
𝕜 : Type u_5
inst✝⁴ : RCLike 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
f : X → 𝕜
hf : Integrable f μ
⊢ ∫ (x : X), ↑(re (f x)) ∂μ + (∫ (x : X), ↑(im (f x)) ∂μ) * I = ∫ (x : X), f x ∂μ
state_after: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝⁵ : MeasurableSpace X
μ : Measure X
𝕜 : Type u_5
inst✝⁴ : RCLike 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
f : X → 𝕜
hf : Integrable f μ
⊢ ∫ (a : X), ↑(re (f a)) + I • ↑(im (f a)) ∂μ = ∫ (x : X), f x ∂μ

case hf
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝⁵ : MeasurableSpace X
μ : Measure X
𝕜 : Type u_5
inst✝⁴ : RCLike 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
f : X → 𝕜
hf : Integrable f μ
⊢ Integrable (fun x => ↑(re (f x))) μ

case hg
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝⁵ : MeasurableSpace X
μ : Measure X
𝕜 : Type u_5
inst✝⁴ : RCLike 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
f : X → 𝕜
hf : Integrable f μ
⊢ Integrable (fun a => I • ↑(im (f a))) μ
tactic: rw [mul_comm, ← smul_eq_mul, ← integral_smul, ← integral_add]
Theorem: IsSelfAdjoint.add_star_self
File: Mathlib/Algebra/Star/SelfAdjoint.lean

Proof steps:
state_before: R : Type u_1
A : Type u_2
inst✝¹ : AddCommMonoid R
inst✝ : StarAddMonoid R
x : R
⊢ IsSelfAdjoint (x + star x)
state_after: no goals
tactic: simp only [isSelfAdjoint_iff, add_comm, star_add, star_star]
Theorem: real_inner_div_norm_mul_norm_eq_neg_one_iff
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 y : F
⊢ ⟪x, y⟫_ℝ / (‖x‖ * ‖y‖) = -1 ↔ x ≠ 0 ∧ ∃ r < 0, y = r • x
state_after: 𝕜 : 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 y : F
⊢ (x ≠ 0 ∧ ∃ x_1, 0 < -x_1 ∧ -y = -x_1 • x) ↔ x ≠ 0 ∧ ∃ r < 0, y = r • x
tactic: rw [← neg_eq_iff_eq_neg, ← neg_div, ← inner_neg_right, ← norm_neg y,
    real_inner_div_norm_mul_norm_eq_one_iff, (@neg_surjective ℝ _).exists]
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 y : F
⊢ (x ≠ 0 ∧ ∃ x_1, 0 < -x_1 ∧ -y = -x_1 • x) ↔ x ≠ 0 ∧ ∃ r < 0, y = r • x
state_after: 𝕜 : 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 y : F
r : ℝ
⊢ 0 < -r ∧ -y = -r • x ↔ r < 0 ∧ y = r • x
tactic: refine Iff.rfl.and (exists_congr fun r => ?_)
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 y : F
r : ℝ
⊢ 0 < -r ∧ -y = -r • x ↔ r < 0 ∧ y = r • x
state_after: no goals
tactic: rw [neg_pos, neg_smul, neg_inj]
Theorem: NNReal.closedBall_zero_eq_Icc'
File: Mathlib/Topology/MetricSpace/Pseudo/Constructions.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : PseudoMetricSpace α
c : ℝ≥0
⊢ closedBall 0 ↑c = Icc 0 c
state_after: case h
α : Type u_1
β : Type u_2
inst✝ : PseudoMetricSpace α
c x : ℝ≥0
⊢ x ∈ closedBall 0 ↑c ↔ x ∈ Icc 0 c
tactic: ext x
state_before: case h
α : Type u_1
β : Type u_2
inst✝ : PseudoMetricSpace α
c x : ℝ≥0
⊢ x ∈ closedBall 0 ↑c ↔ x ∈ Icc 0 c
state_after: no goals
tactic: simp
Theorem: Orthonormal.tsum_inner_products_le
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
x : E
v : ι → E
hv : Orthonormal 𝕜 v
⊢ ∑' (i : ι), ‖⟪v i, x⟫_𝕜‖ ^ 2 ≤ ‖x‖ ^ 2
state_after: 𝕜 : 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
x : E
v : ι → E
hv : Orthonormal 𝕜 v
⊢ 0 ≤ ‖x‖ ^ 2
tactic: refine tsum_le_of_sum_le' ?_ fun s => hv.sum_inner_products_le x
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
x : E
v : ι → E
hv : Orthonormal 𝕜 v
⊢ 0 ≤ ‖x‖ ^ 2
state_after: no goals
tactic: simp only [norm_nonneg, pow_nonneg]
Theorem: toIcoDiv_neg'
File: Mathlib/Algebra/Order/ToIntervalMod.lean

Proof steps:
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
⊢ toIcoDiv hp (-a) b = -(toIocDiv hp a (-b) + 1)
state_after: no goals
tactic: simpa only [neg_neg] using toIcoDiv_neg hp (-a) (-b)
Theorem: SimpleGraph.sup_edge_of_adj
File: Mathlib/Combinatorics/SimpleGraph/Operations.lean

Proof steps:
state_before: V : Type u_1
inst✝ : DecidableEq V
G : SimpleGraph V
s t : V
h : G.Adj s t
⊢ G ⊔ edge s t = G
state_after: no goals
tactic: rwa [sup_eq_left, ← edgeSet_subset_edgeSet, edge_edgeSet_of_ne h.ne, Set.singleton_subset_iff,
    mem_edgeSet]
Theorem: Matrix.trace_col_mul_row
File: Mathlib/LinearAlgebra/Matrix/Trace.lean

Proof steps:
state_before: ι✝ : Type u_1
m : Type u_2
n : Type u_3
p : Type u_4
α : Type u_5
R : Type u_6
S : Type u_7
inst✝⁴ : Fintype m
inst✝³ : Fintype n
inst✝² : Fintype p
ι : Type u_8
inst✝¹ : Unique ι
inst✝ : NonUnitalNonAssocSemiring R
a b : n → R
⊢ (col ι a * row ι b).trace = a ⬝ᵥ b
state_after: ι✝ : Type u_1
m : Type u_2
n : Type u_3
p : Type u_4
α : Type u_5
R : Type u_6
S : Type u_7
inst✝⁴ : Fintype m
inst✝³ : Fintype n
inst✝² : Fintype p
ι : Type u_8
inst✝¹ : Unique ι
inst✝ : NonUnitalNonAssocSemiring R
a b : n → R
⊢ ∀ x ∈ Finset.univ, (col ι a * row ι b).diag x = a x * b x
tactic: apply Finset.sum_congr rfl
state_before: ι✝ : Type u_1
m : Type u_2
n : Type u_3
p : Type u_4
α : Type u_5
R : Type u_6
S : Type u_7
inst✝⁴ : Fintype m
inst✝³ : Fintype n
inst✝² : Fintype p
ι : Type u_8
inst✝¹ : Unique ι
inst✝ : NonUnitalNonAssocSemiring R
a b : n → R
⊢ ∀ x ∈ Finset.univ, (col ι a * row ι b).diag x = a x * b x
state_after: no goals
tactic: simp [mul_apply]
Theorem: Polynomial.isRoot_cyclotomic_prime_pow_mul_iff_of_charP
File: Mathlib/RingTheory/Polynomial/Cyclotomic/Expand.lean

Proof steps:
state_before: m k p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
hp : Fact (Nat.Prime p)
hchar : CharP R p
μ : R
inst✝ : NeZero ↑m
⊢ (cyclotomic (p ^ k * m) R).IsRoot μ ↔ IsPrimitiveRoot μ m
state_after: case inl
m p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
hp : Fact (Nat.Prime p)
hchar : CharP R p
μ : R
inst✝ : NeZero ↑m
⊢ (cyclotomic (p ^ 0 * m) R).IsRoot μ ↔ IsPrimitiveRoot μ m

case inr
m k p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
hp : Fact (Nat.Prime p)
hchar : CharP R p
μ : R
inst✝ : NeZero ↑m
hk : k > 0
⊢ (cyclotomic (p ^ k * m) R).IsRoot μ ↔ IsPrimitiveRoot μ m
tactic: rcases k.eq_zero_or_pos with (rfl | hk)
state_before: case inr
m k p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
hp : Fact (Nat.Prime p)
hchar : CharP R p
μ : R
inst✝ : NeZero ↑m
hk : k > 0
⊢ (cyclotomic (p ^ k * m) R).IsRoot μ ↔ IsPrimitiveRoot μ m
state_after: case inr.refine_1
m k p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
hp : Fact (Nat.Prime p)
hchar : CharP R p
μ : R
inst✝ : NeZero ↑m
hk : k > 0
h : (cyclotomic (p ^ k * m) R).IsRoot μ
⊢ IsPrimitiveRoot μ m

case inr.refine_2
m k p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
hp : Fact (Nat.Prime p)
hchar : CharP R p
μ : R
inst✝ : NeZero ↑m
hk : k > 0
h : IsPrimitiveRoot μ m
⊢ (cyclotomic (p ^ k * m) R).IsRoot μ
tactic: refine ⟨fun h => ?_, fun h => ?_⟩
Theorem: Real.sin_pi_over_two_pow_succ
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

Proof steps:
state_before: x : ℝ
n : ℕ
⊢ sin (π / 2 ^ (n + 2)) = √(2 - sqrtTwoAddSeries 0 n) / 2
state_after: x : ℝ
n : ℕ
⊢ 1 / 2 * 2 ^ 2 - sqrtTwoAddSeries 0 n / 4 * 2 ^ 2 = 2 - sqrtTwoAddSeries 0 n

case hx
x : ℝ
n : ℕ
⊢ 0 ≤ 2 - sqrtTwoAddSeries 0 n

case hy
x : ℝ
n : ℕ
⊢ 0 ≤ sin (π / 2 ^ (n + 2)) * 2
tactic: rw [eq_div_iff_mul_eq two_ne_zero, eq_comm, sqrt_eq_iff_sq_eq, mul_pow,
    sin_sq_pi_over_two_pow_succ, sub_mul]
state_before: case hy
x : ℝ
n : ℕ
⊢ 0 ≤ sin (π / 2 ^ (n + 2)) * 2
state_after: case hy.refine_1
x : ℝ
n : ℕ
⊢ 0 ≤ π / 2 ^ (n + 2)

case hy.refine_2
x : ℝ
n : ℕ
⊢ π / 2 ^ (n + 2) ≤ π
tactic: refine mul_nonneg (sin_nonneg_of_nonneg_of_le_pi ?_ ?_) zero_le_two
Theorem: Polynomial.coeff_zero_eq_eval_zero
File: Mathlib/Algebra/Polynomial/Eval.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝ : Semiring R
p✝ q r : R[X]
x : R
p : R[X]
⊢ p.coeff 0 = p.coeff 0 * 0 ^ 0
state_after: no goals
tactic: simp
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝ : Semiring R
p✝ q r : R[X]
x : R
p : R[X]
⊢ p.coeff 0 * 0 ^ 0 = eval 0 p
state_after: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝ : Semiring R
p✝ q r : R[X]
x : R
p : R[X]
⊢ eval 0 p = p.coeff 0 * 0 ^ 0
tactic: symm
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝ : Semiring R
p✝ q r : R[X]
x : R
p : R[X]
⊢ eval 0 p = p.coeff 0 * 0 ^ 0
state_after: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝ : Semiring R
p✝ q r : R[X]
x : R
p : R[X]
⊢ (p.sum fun e a => a * 0 ^ e) = p.coeff 0 * 0 ^ 0
tactic: rw [eval_eq_sum]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝ : Semiring R
p✝ q r : R[X]
x : R
p : R[X]
⊢ (p.sum fun e a => a * 0 ^ e) = p.coeff 0 * 0 ^ 0
state_after: no goals
tactic: exact Finset.sum_eq_single _ (fun b _ hb => by simp [zero_pow hb]) (by simp)