ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: List.getElem?_scanl_zero
File: Mathlib/Data/List/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : β → α → β
b : β
a : α
l : List α
⊢ (scanl f b l)[0]? = some b
state_after: case nil
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : β → α → β
b : β
a : α
⊢ (scanl f b [])[0]? = some b

case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : β → α → β
b : β
a head✝ : α
tail✝ : List α
⊢ (scanl f b (head✝ :: tail✝))[0]? = some b
tactic: cases l
Theorem: CategoryTheory.Bicategory.id_whiskerLeft_symm
File: Mathlib/CategoryTheory/Bicategory/Basic.lean

Proof steps:
state_before: B : Type u
inst✝ : Bicategory B
a b c d e : B
f g : a ⟶ b
η : f ⟶ g
⊢ η = (λ_ f).inv ≫ 𝟙 a ◁ η ≫ (λ_ g).hom
state_after: no goals
tactic: simp
Theorem: CochainComplex.mappingCone.inr_f_desc_f
File: Mathlib/Algebra/Homology/HomotopyCategory/MappingCone.lean

Proof steps:
state_before: C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : Category.{?u.151043, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
F G : CochainComplex C ℤ
φ : F ⟶ G
inst✝ : HasHomotopyCofiber φ
K : CochainComplex C ℤ
α : Cochain F K (-1)
β : G ⟶ K
eq : δ (-1) 0 α = Cochain.ofHom (φ ≫ β)
p : ℤ
⊢ (inr φ).f p ≫ (desc φ α β eq).f p = β.f p
state_after: no goals
tactic: simp [desc]
Theorem: multiplicity.Int.natAbs
File: Mathlib/RingTheory/Multiplicity.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Ring α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a : ℕ
b : ℤ
⊢ multiplicity a b.natAbs = multiplicity (↑a) b
state_after: case inl
α : Type u_1
β : Type u_2
inst✝¹ : Ring α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a : ℕ
b : ℤ
h : b = ↑b.natAbs
⊢ multiplicity a b.natAbs = multiplicity ↑a ↑b.natAbs

case inr
α : Type u_1
β : Type u_2
inst✝¹ : Ring α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a : ℕ
b : ℤ
h : b = -↑b.natAbs
⊢ multiplicity a b.natAbs = multiplicity (↑a) (-↑b.natAbs)
tactic: cases' Int.natAbs_eq b with h h <;> conv_rhs => rw [h]
Theorem: List.mapIdxGo_length
File: Mathlib/Data/List/Indexes.lean

Proof steps:
state_before: α : Type u
β : Type v
⊢ ∀ (f : ℕ → α → β) (l : List α) (arr : Array β), (mapIdx.go f l arr).length = l.length + arr.size
state_after: α : Type u
β : Type v
f : ℕ → α → β
l : List α
⊢ ∀ (arr : Array β), (mapIdx.go f l arr).length = l.length + arr.size
tactic: intro f l
state_before: α : Type u
β : Type v
f : ℕ → α → β
l : List α
⊢ ∀ (arr : Array β), (mapIdx.go f l arr).length = l.length + arr.size
state_after: case nil
α : Type u
β : Type v
f : ℕ → α → β
⊢ ∀ (arr : Array β), (mapIdx.go f [] arr).length = [].length + arr.size

case cons
α : Type u
β : Type v
f : ℕ → α → β
head : α
tail : List α
ih : ∀ (arr : Array β), (mapIdx.go f tail arr).length = tail.length + arr.size
⊢ ∀ (arr : Array β), (mapIdx.go f (head :: tail) arr).length = (head :: tail).length + arr.size
tactic: induction' l with head tail ih
Theorem: OnePoint.le_nhds_infty
File: Mathlib/Topology/Compactification/OnePoint.lean

Proof steps:
state_before: X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
f : Filter (OnePoint X)
⊢ f ≤ 𝓝 ∞ ↔ ∀ (s : Set X), IsClosed s → IsCompact s → some '' sᶜ ∪ {∞} ∈ f
state_after: no goals
tactic: simp only [hasBasis_nhds_infty.ge_iff, and_imp]
Theorem: addOrderOf_eq_prime_pow
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)
hnot : ¬x ^ p ^ n = 1
hfin : x ^ p ^ (n + 1) = 1
⊢ orderOf x = p ^ (n + 1)
state_after: no goals
tactic: apply minimalPeriod_eq_prime_pow <;> rwa [isPeriodicPt_mul_iff_pow_eq_one]
Theorem: Int.natAbs_abs
File: Mathlib/Algebra/Order/Group/Int.lean

Proof steps:
state_before: a : ℤ
⊢ |a|.natAbs = a.natAbs
state_after: a : ℤ
⊢ (↑a.natAbs).natAbs = a.natAbs
tactic: rw [abs_eq_natAbs]
state_before: a : ℤ
⊢ (↑a.natAbs).natAbs = a.natAbs
state_after: no goals
tactic: rfl
Theorem: gal_X_pow_isSolvable
File: Mathlib/FieldTheory/AbelRuffini.lean

Proof steps:
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
n : ℕ
⊢ IsSolvable (X ^ n).Gal
state_after: no goals
tactic: infer_instance
Theorem: pathConnectedSpace_iff_univ
File: Mathlib/Topology/Connected/PathConnected.lean

Proof steps:
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
⊢ PathConnectedSpace X ↔ IsPathConnected univ
state_after: case mp
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
⊢ PathConnectedSpace X → IsPathConnected univ

case mpr
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
⊢ IsPathConnected univ → PathConnectedSpace X
tactic: constructor
Theorem: Submodule.mapQ_comp
File: Mathlib/LinearAlgebra/Quotient.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
r : R
x y : M
inst✝⁹ : Ring R
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
p p' : Submodule R M
R₂ : Type u_3
M₂ : Type u_4
inst✝⁶ : Ring R₂
inst✝⁵ : AddCommGroup M₂
inst✝⁴ : Module R₂ M₂
τ₁₂ : R →+* R₂
q : Submodule R₂ M₂
R₃ : Type u_5
M₃ : Type u_6
inst✝³ : Ring R₃
inst✝² : AddCommGroup M₃
inst✝¹ : Module R₃ M₃
p₂ : Submodule R₂ M₂
p₃ : Submodule R₃ M₃
τ₂₃ : R₂ →+* R₃
τ₁₃ : R →+* R₃
inst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃
f : M →ₛₗ[τ₁₂] M₂
g : M₂ →ₛₗ[τ₂₃] M₃
hf : p ≤ comap f p₂
hg : p₂ ≤ comap g p₃
h : optParam (p ≤ comap f (comap g p₃)) ⋯
⊢ p.mapQ p₃ (g.comp f) h = (p₂.mapQ p₃ g hg).comp (p.mapQ p₂ f hf)
state_after: case h.h
R : Type u_1
M : Type u_2
r : R
x y : M
inst✝⁹ : Ring R
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
p p' : Submodule R M
R₂ : Type u_3
M₂ : Type u_4
inst✝⁶ : Ring R₂
inst✝⁵ : AddCommGroup M₂
inst✝⁴ : Module R₂ M₂
τ₁₂ : R →+* R₂
q : Submodule R₂ M₂
R₃ : Type u_5
M₃ : Type u_6
inst✝³ : Ring R₃
inst✝² : AddCommGroup M₃
inst✝¹ : Module R₃ M₃
p₂ : Submodule R₂ M₂
p₃ : Submodule R₃ M₃
τ₂₃ : R₂ →+* R₃
τ₁₃ : R →+* R₃
inst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃
f : M →ₛₗ[τ₁₂] M₂
g : M₂ →ₛₗ[τ₂₃] M₃
hf : p ≤ comap f p₂
hg : p₂ ≤ comap g p₃
h : optParam (p ≤ comap f (comap g p₃)) ⋯
x✝ : M
⊢ ((p.mapQ p₃ (g.comp f) h).comp p.mkQ) x✝ = (((p₂.mapQ p₃ g hg).comp (p.mapQ p₂ f hf)).comp p.mkQ) x✝
tactic: ext
state_before: case h.h
R : Type u_1
M : Type u_2
r : R
x y : M
inst✝⁹ : Ring R
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
p p' : Submodule R M
R₂ : Type u_3
M₂ : Type u_4
inst✝⁶ : Ring R₂
inst✝⁵ : AddCommGroup M₂
inst✝⁴ : Module R₂ M₂
τ₁₂ : R →+* R₂
q : Submodule R₂ M₂
R₃ : Type u_5
M₃ : Type u_6
inst✝³ : Ring R₃
inst✝² : AddCommGroup M₃
inst✝¹ : Module R₃ M₃
p₂ : Submodule R₂ M₂
p₃ : Submodule R₃ M₃
τ₂₃ : R₂ →+* R₃
τ₁₃ : R →+* R₃
inst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃
f : M →ₛₗ[τ₁₂] M₂
g : M₂ →ₛₗ[τ₂₃] M₃
hf : p ≤ comap f p₂
hg : p₂ ≤ comap g p₃
h : optParam (p ≤ comap f (comap g p₃)) ⋯
x✝ : M
⊢ ((p.mapQ p₃ (g.comp f) h).comp p.mkQ) x✝ = (((p₂.mapQ p₃ g hg).comp (p.mapQ p₂ f hf)).comp p.mkQ) x✝
state_after: no goals
tactic: simp
Theorem: MvPowerSeries.constantCoeff_invOfUnit
File: Mathlib/RingTheory/MvPowerSeries/Inverse.lean

Proof steps:
state_before: σ : Type u_1
R : Type u_2
inst✝ : Ring R
φ : MvPowerSeries σ R
u : Rˣ
⊢ (constantCoeff σ R) (φ.invOfUnit u) = ↑u⁻¹
state_after: no goals
tactic: classical
  rw [← coeff_zero_eq_constantCoeff_apply, coeff_invOfUnit, if_pos rfl]
Theorem: ofDual_compares_ofDual
File: Mathlib/Order/Compare.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : LT α
a b : αᵒᵈ
o : Ordering
⊢ o.Compares (ofDual a) (ofDual b) ↔ o.Compares b a
state_after: case lt
α : Type u_1
β : Type u_2
inst✝ : LT α
a b : αᵒᵈ
⊢ lt.Compares (ofDual a) (ofDual b) ↔ lt.Compares b a

case eq
α : Type u_1
β : Type u_2
inst✝ : LT α
a b : αᵒᵈ
⊢ eq.Compares (ofDual a) (ofDual b) ↔ eq.Compares b a

case gt
α : Type u_1
β : Type u_2
inst✝ : LT α
a b : αᵒᵈ
⊢ gt.Compares (ofDual a) (ofDual b) ↔ gt.Compares b a
tactic: cases o
state_before: case lt
α : Type u_1
β : Type u_2
inst✝ : LT α
a b : αᵒᵈ
⊢ lt.Compares (ofDual a) (ofDual b) ↔ lt.Compares b a

case eq
α : Type u_1
β : Type u_2
inst✝ : LT α
a b : αᵒᵈ
⊢ eq.Compares (ofDual a) (ofDual b) ↔ eq.Compares b a

case gt
α : Type u_1
β : Type u_2
inst✝ : LT α
a b : αᵒᵈ
⊢ gt.Compares (ofDual a) (ofDual b) ↔ gt.Compares b a
state_after: no goals
tactic: exacts [Iff.rfl, eq_comm, Iff.rfl]
Theorem: CochainComplex.ShiftSequence.shiftIso_inv_app
File: Mathlib/Algebra/Homology/HomotopyCategory/ShiftSequence.lean

Proof steps:
state_before: C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Preadditive C
inst✝ : CategoryWithHomology C
n a a' : ℤ
ha' : n + a = a'
K : CochainComplex C ℤ
⊢ (shiftIso C n a a' ha').inv.app K = ShortComplex.homologyMap ((shiftShortComplexFunctorIso C n a a' ha').inv.app K)
state_after: C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Preadditive C
inst✝ : CategoryWithHomology C
n a a' : ℤ
ha' : n + a = a'
K : CochainComplex C ℤ
⊢ ((𝟙 (homology K a') ≫ ShortComplex.homologyMap ((shiftShortComplexFunctorIso C n a a' ha').inv.app K)) ≫
        𝟙
          ((shortComplexFunctor C (up ℤ) a).obj
              ((CategoryTheory.shiftFunctor (HomologicalComplex C (up ℤ)) n).obj K)).homology) ≫
      𝟙 (((CategoryTheory.shiftFunctor (HomologicalComplex C (up ℤ)) n).obj K).homology a) =
    ShortComplex.homologyMap ((shiftShortComplexFunctorIso C n a a' ha').inv.app K)
tactic: dsimp [shiftIso]
state_before: C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Preadditive C
inst✝ : CategoryWithHomology C
n a a' : ℤ
ha' : n + a = a'
K : CochainComplex C ℤ
⊢ ((𝟙 (homology K a') ≫ ShortComplex.homologyMap ((shiftShortComplexFunctorIso C n a a' ha').inv.app K)) ≫
        𝟙
          ((shortComplexFunctor C (up ℤ) a).obj
              ((CategoryTheory.shiftFunctor (HomologicalComplex C (up ℤ)) n).obj K)).homology) ≫
      𝟙 (((CategoryTheory.shiftFunctor (HomologicalComplex C (up ℤ)) n).obj K).homology a) =
    ShortComplex.homologyMap ((shiftShortComplexFunctorIso C n a a' ha').inv.app K)
state_after: no goals
tactic: erw [id_comp, comp_id, comp_id]
Theorem: Polynomial.natDegree_pos_of_nextCoeff_ne_zero
File: Mathlib/Algebra/Polynomial/Degree/Lemmas.lean

Proof steps:
state_before: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝¹ : Semiring R
p q r : R[X]
inst✝ : Semiring S
h : p.nextCoeff ≠ 0
⊢ 0 < p.natDegree
state_after: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝¹ : Semiring R
p q r : R[X]
inst✝ : Semiring S
h : (if p.natDegree = 0 then 0 else p.coeff (p.natDegree - 1)) ≠ 0
⊢ 0 < p.natDegree
tactic: rw [nextCoeff] at h
state_before: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝¹ : Semiring R
p q r : R[X]
inst✝ : Semiring S
h : (if p.natDegree = 0 then 0 else p.coeff (p.natDegree - 1)) ≠ 0
⊢ 0 < p.natDegree
state_after: case pos
R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝¹ : Semiring R
p q r : R[X]
inst✝ : Semiring S
h : (if p.natDegree = 0 then 0 else p.coeff (p.natDegree - 1)) ≠ 0
hpz : p.natDegree = 0
⊢ 0 < p.natDegree

case neg
R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝¹ : Semiring R
p q r : R[X]
inst✝ : Semiring S
h : (if p.natDegree = 0 then 0 else p.coeff (p.natDegree - 1)) ≠ 0
hpz : ¬p.natDegree = 0
⊢ 0 < p.natDegree
tactic: by_cases hpz : p.natDegree = 0
Theorem: Monotone.seq_pos_lt_seq_of_lt_of_le
File: Mathlib/Order/Iterate.lean

Proof steps:
state_before: α : Type u_1
inst✝ : Preorder α
f : α → α
x y : ℕ → α
hf : Monotone f
n : ℕ
hn : 0 < n
h₀ : x 0 ≤ y 0
hx : ∀ (k : ℕ), k < n → x (k + 1) < f (x k)
hy : ∀ (k : ℕ), k < n → f (y k) ≤ y (k + 1)
⊢ x n < y n
state_after: case zero
α : Type u_1
inst✝ : Preorder α
f : α → α
x y : ℕ → α
hf : Monotone f
h₀ : x 0 ≤ y 0
hn : 0 < 0
hx : ∀ (k : ℕ), k < 0 → x (k + 1) < f (x k)
hy : ∀ (k : ℕ), k < 0 → f (y k) ≤ y (k + 1)
⊢ x 0 < y 0

case succ
α : Type u_1
inst✝ : Preorder α
f : α → α
x y : ℕ → α
hf : Monotone f
h₀ : x 0 ≤ y 0
n : ℕ
ihn : 0 < n → (∀ (k : ℕ), k < n → x (k + 1) < f (x k)) → (∀ (k : ℕ), k < n → f (y k) ≤ y (k + 1)) → x n < y n
hn : 0 < n + 1
hx : ∀ (k : ℕ), k < n + 1 → x (k + 1) < f (x k)
hy : ∀ (k : ℕ), k < n + 1 → f (y k) ≤ y (k + 1)
⊢ x (n + 1) < y (n + 1)
tactic: induction' n with n ihn
state_before: case succ
α : Type u_1
inst✝ : Preorder α
f : α → α
x y : ℕ → α
hf : Monotone f
h₀ : x 0 ≤ y 0
n : ℕ
ihn : 0 < n → (∀ (k : ℕ), k < n → x (k + 1) < f (x k)) → (∀ (k : ℕ), k < n → f (y k) ≤ y (k + 1)) → x n < y n
hn : 0 < n + 1
hx : ∀ (k : ℕ), k < n + 1 → x (k + 1) < f (x k)
hy : ∀ (k : ℕ), k < n + 1 → f (y k) ≤ y (k + 1)
⊢ x (n + 1) < y (n + 1)
state_after: case succ
α : Type u_1
inst✝ : Preorder α
f : α → α
x y : ℕ → α
hf : Monotone f
h₀ : x 0 ≤ y 0
n : ℕ
ihn : 0 < n → (∀ (k : ℕ), k < n → x (k + 1) < f (x k)) → (∀ (k : ℕ), k < n → f (y k) ≤ y (k + 1)) → x n < y n
hn : 0 < n + 1
hx : ∀ (k : ℕ), k < n + 1 → x (k + 1) < f (x k)
hy : ∀ (k : ℕ), k < n + 1 → f (y k) ≤ y (k + 1)
⊢ x n ≤ y n
tactic: suffices x n ≤ y n from (hx n n.lt_succ_self).trans_le ((hf this).trans <| hy n n.lt_succ_self)
state_before: case succ
α : Type u_1
inst✝ : Preorder α
f : α → α
x y : ℕ → α
hf : Monotone f
h₀ : x 0 ≤ y 0
n : ℕ
ihn : 0 < n → (∀ (k : ℕ), k < n → x (k + 1) < f (x k)) → (∀ (k : ℕ), k < n → f (y k) ≤ y (k + 1)) → x n < y n
hn : 0 < n + 1
hx : ∀ (k : ℕ), k < n + 1 → x (k + 1) < f (x k)
hy : ∀ (k : ℕ), k < n + 1 → f (y k) ≤ y (k + 1)
⊢ x n ≤ y n
state_after: no goals
tactic: cases n with
  | zero => exact h₀
  | succ n =>
    refine (ihn n.zero_lt_succ (fun k hk => hx _ ?_) fun k hk => hy _ ?_).le <;>
    exact hk.trans n.succ.lt_succ_self
Theorem: Complex.isPrimitiveRoot_exp
File: Mathlib/RingTheory/RootsOfUnity/Complex.lean

Proof steps:
state_before: n : ℕ
h0 : n ≠ 0
⊢ IsPrimitiveRoot (cexp (2 * ↑π * I / ↑n)) n
state_after: no goals
tactic: simpa only [Nat.cast_one, one_div] using
    isPrimitiveRoot_exp_of_coprime 1 n h0 n.coprime_one_left
Theorem: Nat.ModEq.cancel_right_div_gcd
File: Mathlib/Data/Nat/ModEq.lean

Proof steps:
state_before: m n a b c d : ℕ
hm : 0 < m
h : a * c ≡ b * c [MOD m]
⊢ a ≡ b [MOD m / m.gcd c]
state_after: m n a b c d : ℕ
hm : 0 < m
h : a * c ≡ b * c [MOD m]
⊢ c * a ≡ c * b [MOD m]
tactic: apply cancel_left_div_gcd hm
state_before: m n a b c d : ℕ
hm : 0 < m
h : a * c ≡ b * c [MOD m]
⊢ c * a ≡ c * b [MOD m]
state_after: no goals
tactic: simpa [mul_comm] using h
Theorem: ProbabilityTheory.Kernel.sum_const
File: Mathlib/Probability/Kernel/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : Kernel α β
inst✝ : Countable ι
μ : ι → Measure β
⊢ (Kernel.sum fun n => const α (μ n)) = const α (Measure.sum μ)
state_after: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : Kernel α β
inst✝ : Countable ι
μ : ι → Measure β
x : α
s : Set β
hs : MeasurableSet s
⊢ ((Kernel.sum fun n => const α (μ n)) x) s = ((const α (Measure.sum μ)) x) s
tactic: ext x s hs
state_before: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : Kernel α β
inst✝ : Countable ι
μ : ι → Measure β
x : α
s : Set β
hs : MeasurableSet s
⊢ ((Kernel.sum fun n => const α (μ n)) x) s = ((const α (Measure.sum μ)) x) s
state_after: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : Kernel α β
inst✝ : Countable ι
μ : ι → Measure β
x : α
s : Set β
hs : MeasurableSet s
⊢ ∑' (n : ι), ((const α (μ n)) x) s = ∑' (i : ι), (μ i) s
tactic: rw [const_apply, Measure.sum_apply _ hs, Kernel.sum_apply' _ _ hs]
state_before: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : Kernel α β
inst✝ : Countable ι
μ : ι → Measure β
x : α
s : Set β
hs : MeasurableSet s
⊢ ∑' (n : ι), ((const α (μ n)) x) s = ∑' (i : ι), (μ i) s
state_after: no goals
tactic: simp only [const_apply]
Theorem: summable_iff_not_tendsto_nat_atTop_of_nonneg
File: Mathlib/Topology/Algebra/InfiniteSum/Real.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : PseudoMetricSpace α
f✝ : ℕ → α
a : α
f : ℕ → ℝ
hf : ∀ (n : ℕ), 0 ≤ f n
⊢ Summable f ↔ ¬Tendsto (fun n => ∑ i ∈ range n, f i) atTop atTop
state_after: no goals
tactic: rw [← not_iff_not, Classical.not_not, not_summable_iff_tendsto_nat_atTop_of_nonneg hf]
Theorem: Real.abs_sin_le_one
File: Mathlib/Data/Complex/Exponential.lean

Proof steps:
state_before: x y : ℝ
⊢ sin x * sin x ≤ 1
state_after: no goals
tactic: simp only [← sq, sin_sq_le_one]
Theorem: List.exists_mem_ne_zero_of_sum_ne_zero
File: Mathlib/Algebra/BigOperators/Group/List.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
G : Type u_7
inst✝² : Monoid M
inst✝¹ : Monoid N
inst✝ : Monoid P
l l₁ l₂ : List M
a : M
h : l.prod ≠ 1
⊢ ∃ x ∈ l, x ≠ 1
state_after: no goals
tactic: simpa only [not_forall, exists_prop] using mt prod_eq_one h
Theorem: AlgebraicGeometry.Scheme.stalkMap_hom_inv_apply
File: Mathlib/AlgebraicGeometry/Scheme.lean

Proof steps:
state_before: X Y : Scheme
f : X ⟶ Y
e : X ≅ Y
y : ↑↑Y.toPresheafedSpace
z : ↑(Y.presheaf.stalk (e.hom.val.base (e.inv.val.base y)))
⊢ y = e.hom.val.base (e.inv.val.base y)
state_after: no goals
tactic: simp
Theorem: inducing_of_inducing_compose
File: Mathlib/Topology/Maps/Basic.lean

Proof steps:
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
ι : Type u_4
f : X → Y
g : Y → Z
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
hf : Continuous f
hg : Continuous g
hgf : Inducing (g ∘ f)
⊢ inst✝² ≤ induced f inst✝¹
state_after: no goals
tactic: rwa [← continuous_iff_le_induced]
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
ι : Type u_4
f : X → Y
g : Y → Z
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
hf : Continuous f
hg : Continuous g
hgf : Inducing (g ∘ f)
⊢ induced f inst✝¹ ≤ inst✝²
state_after: X : Type u_1
Y : Type u_2
Z : Type u_3
ι : Type u_4
f : X → Y
g : Y → Z
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
hf : Continuous f
hg : Continuous g
hgf : Inducing (g ∘ f)
⊢ induced f inst✝¹ ≤ induced f (induced g inst✝)
tactic: rw [hgf.induced, ← induced_compose]
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
ι : Type u_4
f : X → Y
g : Y → Z
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
hf : Continuous f
hg : Continuous g
hgf : Inducing (g ∘ f)
⊢ induced f inst✝¹ ≤ induced f (induced g inst✝)
state_after: no goals
tactic: exact induced_mono hg.le_induced
Theorem: Real.tendsto_sin_neg_pi_div_two
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

Proof steps:
state_before: ⊢ Tendsto sin (𝓝[>] (-(π / 2))) (𝓝 (-1))
state_after: case h.e'_5.h.e'_3

⊢ -1 = sin (-(π / 2))
tactic: convert continuous_sin.continuousWithinAt.tendsto using 2
state_before: case h.e'_5.h.e'_3

⊢ -1 = sin (-(π / 2))
state_after: no goals
tactic: simp
Theorem: CategoryTheory.ShortComplex.RightHomologyMapData.congr_φQ
File: Mathlib/Algebra/Homology/ShortComplex/RightHomology.lean

Proof steps:
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : S₁.RightHomologyData
h₂ : S₂.RightHomologyData
γ₁ γ₂ : RightHomologyMapData φ h₁ h₂
eq : γ₁ = γ₂
⊢ γ₁.φQ = γ₂.φQ
state_after: no goals
tactic: rw [eq]
Theorem: gal_one_isSolvable
File: Mathlib/FieldTheory/AbelRuffini.lean

Proof steps:
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
⊢ IsSolvable (Gal 1)
state_after: no goals
tactic: infer_instance
Theorem: AddUnits.addCommute_coe_neg
File: Mathlib/Algebra/Group/Units.lean

Proof steps:
state_before: α : Type u
inst✝ : Monoid α
a b c u : αˣ
⊢ Commute ↑a ↑a⁻¹
state_after: no goals
tactic: rw [Commute, SemiconjBy, inv_mul, mul_inv]
Theorem: Subgroup.index_map
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
f : G →* G'
⊢ (map f H).index = (H ⊔ f.ker).index * f.range.index
state_after: no goals
tactic: rw [← comap_map_eq, index_comap, relindex_mul_index (H.map_le_range f)]
Theorem: List.monotone_prod_take
File: Mathlib/Algebra/Order/BigOperators/Group/List.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
M : Type u_3
N : Type u_4
P : Type u_5
M₀ : Type u_6
G : Type u_7
R : Type u_8
inst✝ : CanonicallyOrderedCommMonoid M
l L : List M
⊢ Monotone fun i => (take i L).prod
state_after: ι : Type u_1
α : Type u_2
M : Type u_3
N : Type u_4
P : Type u_5
M₀ : Type u_6
G : Type u_7
R : Type u_8
inst✝ : CanonicallyOrderedCommMonoid M
l L : List M
n : ℕ
⊢ (take n L).prod ≤ (take (n + 1) L).prod
tactic: refine monotone_nat_of_le_succ fun n => ?_
state_before: ι : Type u_1
α : Type u_2
M : Type u_3
N : Type u_4
P : Type u_5
M₀ : Type u_6
G : Type u_7
R : Type u_8
inst✝ : CanonicallyOrderedCommMonoid M
l L : List M
n : ℕ
⊢ (take n L).prod ≤ (take (n + 1) L).prod
state_after: case inl
ι : Type u_1
α : Type u_2
M : Type u_3
N : Type u_4
P : Type u_5
M₀ : Type u_6
G : Type u_7
R : Type u_8
inst✝ : CanonicallyOrderedCommMonoid M
l L : List M
n : ℕ
h : n < L.length
⊢ (take n L).prod ≤ (take (n + 1) L).prod

case inr
ι : Type u_1
α : Type u_2
M : Type u_3
N : Type u_4
P : Type u_5
M₀ : Type u_6
G : Type u_7
R : Type u_8
inst✝ : CanonicallyOrderedCommMonoid M
l L : List M
n : ℕ
h : L.length ≤ n
⊢ (take n L).prod ≤ (take (n + 1) L).prod
tactic: cases' lt_or_le n L.length with h h
Theorem: abs_eq_self
File: Mathlib/Algebra/Order/Group/Abs.lean

Proof steps:
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a b c d : α
⊢ |a| = a ↔ 0 ≤ a
state_after: no goals
tactic: rw [abs_eq_max_neg, max_eq_left_iff, neg_le_self_iff]
Theorem: Quaternion.mul_imI
File: Mathlib/Algebra/Quaternion.lean

Proof steps:
state_before: S : Type u_1
T : Type u_2
R : Type u_3
inst✝ : CommRing R
r x y z : R
a b c : ℍ[R]
⊢ a.re * b.imI + a.imI * b.re - -1 * a.imJ * b.imK + -1 * a.imK * b.imJ =
    a.re * b.imI + a.imI * b.re + a.imJ * b.imK - a.imK * b.imJ
state_after: no goals
tactic: simp only [one_mul, neg_mul, sub_eq_add_neg, neg_neg]
Theorem: isPrimePow_nat_iff_bounded
File: Mathlib/Algebra/IsPrimePow.lean

Proof steps:
state_before: R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p : R
k n : ℕ
⊢ IsPrimePow n ↔ ∃ p ≤ n, ∃ k ≤ n, Nat.Prime p ∧ 0 < k ∧ p ^ k = n
state_after: R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p : R
k n : ℕ
⊢ (∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n) ↔ ∃ p ≤ n, ∃ k ≤ n, Nat.Prime p ∧ 0 < k ∧ p ^ k = n
tactic: rw [isPrimePow_nat_iff]
state_before: R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p : R
k n : ℕ
⊢ (∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n) ↔ ∃ p ≤ n, ∃ k ≤ n, Nat.Prime p ∧ 0 < k ∧ p ^ k = n
state_after: R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p : R
k n : ℕ
⊢ (∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n) → ∃ p ≤ n, ∃ k ≤ n, Nat.Prime p ∧ 0 < k ∧ p ^ k = n
tactic: refine Iff.symm ⟨fun ⟨p, _, k, _, hp, hk, hn⟩ => ⟨p, k, hp, hk, hn⟩, ?_⟩
state_before: R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p : R
k n : ℕ
⊢ (∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n) → ∃ p ≤ n, ∃ k ≤ n, Nat.Prime p ∧ 0 < k ∧ p ^ k = n
state_after: case intro.intro.intro.intro
R : Type u_1
inst✝ : CommMonoidWithZero R
n p✝ : R
k✝ p k : ℕ
hp : Nat.Prime p
hk : 0 < k
⊢ ∃ p_1 ≤ p ^ k, ∃ k_1 ≤ p ^ k, Nat.Prime p_1 ∧ 0 < k_1 ∧ p_1 ^ k_1 = p ^ k
tactic: rintro ⟨p, k, hp, hk, rfl⟩
state_before: case intro.intro.intro.intro
R : Type u_1
inst✝ : CommMonoidWithZero R
n p✝ : R
k✝ p k : ℕ
hp : Nat.Prime p
hk : 0 < k
⊢ ∃ p_1 ≤ p ^ k, ∃ k_1 ≤ p ^ k, Nat.Prime p_1 ∧ 0 < k_1 ∧ p_1 ^ k_1 = p ^ k
state_after: case intro.intro.intro.intro
R : Type u_1
inst✝ : CommMonoidWithZero R
n p✝ : R
k✝ p k : ℕ
hp : Nat.Prime p
hk : 0 < k
⊢ p ≤ p ^ k
tactic: refine ⟨p, ?_, k, (Nat.lt_pow_self hp.one_lt _).le, hp, hk, rfl⟩
state_before: case intro.intro.intro.intro
R : Type u_1
inst✝ : CommMonoidWithZero R
n p✝ : R
k✝ p k : ℕ
hp : Nat.Prime p
hk : 0 < k
⊢ p ≤ p ^ k
state_after: case intro.intro.intro.intro
R : Type u_1
inst✝ : CommMonoidWithZero R
n p✝ : R
k✝ p k : ℕ
hp : Nat.Prime p
hk : 0 < k
⊢ p ^ 1 ≤ p ^ k
tactic: conv => { lhs; rw [← (pow_one p)] }
state_before: case intro.intro.intro.intro
R : Type u_1
inst✝ : CommMonoidWithZero R
n p✝ : R
k✝ p k : ℕ
hp : Nat.Prime p
hk : 0 < k
⊢ p ^ 1 ≤ p ^ k
state_after: no goals
tactic: exact Nat.pow_le_pow_right hp.one_lt.le hk