ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Nat.multichoose_one_right
File: Mathlib/Data/Nat/Choose/Basic.lean

Proof steps:
state_before: n : ℕ
⊢ n.multichoose 1 = n
state_after: case zero

⊢ multichoose 0 1 = 0

case succ
n : ℕ
IH : n.multichoose 1 = n
⊢ (n + 1).multichoose 1 = n + 1
tactic: induction' n with n IH
state_before: case succ
n : ℕ
IH : n.multichoose 1 = n
⊢ (n + 1).multichoose 1 = n + 1
state_after: no goals
tactic: simp [multichoose_succ_succ n 0, IH]
Theorem: ZMod.castHom_injective
File: Mathlib/Data/ZMod/Basic.lean

Proof steps:
state_before: n : ℕ
R : Type u_1
inst✝¹ : Ring R
inst✝ : CharP R n
⊢ Injective ⇑(castHom ⋯ R)
state_after: n : ℕ
R : Type u_1
inst✝¹ : Ring R
inst✝ : CharP R n
⊢ ∀ (a : ZMod n), (castHom ⋯ R) a = 0 → a = 0
tactic: rw [injective_iff_map_eq_zero]
state_before: n : ℕ
R : Type u_1
inst✝¹ : Ring R
inst✝ : CharP R n
⊢ ∀ (a : ZMod n), (castHom ⋯ R) a = 0 → a = 0
state_after: n : ℕ
R : Type u_1
inst✝¹ : Ring R
inst✝ : CharP R n
x : ZMod n
⊢ (castHom ⋯ R) x = 0 → x = 0
tactic: intro x
state_before: n : ℕ
R : Type u_1
inst✝¹ : Ring R
inst✝ : CharP R n
x : ZMod n
⊢ (castHom ⋯ R) x = 0 → x = 0
state_after: case intro
n : ℕ
R : Type u_1
inst✝¹ : Ring R
inst✝ : CharP R n
k : ℤ
⊢ (castHom ⋯ R) ↑k = 0 → ↑k = 0
tactic: obtain ⟨k, rfl⟩ := ZMod.intCast_surjective x
state_before: case intro
n : ℕ
R : Type u_1
inst✝¹ : Ring R
inst✝ : CharP R n
k : ℤ
⊢ (castHom ⋯ R) ↑k = 0 → ↑k = 0
state_after: case intro
n : ℕ
R : Type u_1
inst✝¹ : Ring R
inst✝ : CharP R n
k : ℤ
⊢ ↑n ∣ k → ↑n ∣ k
tactic: rw [map_intCast, CharP.intCast_eq_zero_iff R n, CharP.intCast_eq_zero_iff (ZMod n) n]
state_before: case intro
n : ℕ
R : Type u_1
inst✝¹ : Ring R
inst✝ : CharP R n
k : ℤ
⊢ ↑n ∣ k → ↑n ∣ k
state_after: no goals
tactic: exact id
Theorem: CategoryTheory.Limits.PullbackCone.IsLimit.type_ext
File: Mathlib/CategoryTheory/Limits/Shapes/Types.lean

Proof steps:
state_before: X Y S : Type v
f : X ⟶ S
g : Y ⟶ S
c : PullbackCone f g
hc : IsLimit c
x y : c.pt
h₁ : c.fst x = c.fst y
h₂ : c.snd x = c.snd y
⊢ (equivPullbackObj hc) x = (equivPullbackObj hc) y
state_after: no goals
tactic: ext <;> assumption
Theorem: IsSubgroup.trivial_eq_closure
File: Mathlib/Deprecated/Subgroup.lean

Proof steps:
state_before: G : Type u_1
H : Type u_2
A : Type u_3
a a₁ a₂ b c : G
inst✝ : Group G
⊢ trivial G ⊆ Group.closure ∅
state_after: no goals
tactic: simp [Set.subset_def, (Group.closure.isSubgroup _).one_mem]
state_before: G : Type u_1
H : Type u_2
A : Type u_3
a a₁ a₂ b c : G
inst✝ : Group G
⊢ ∅ ⊆ trivial G
state_after: no goals
tactic: simp
Theorem: ENNReal.rpow_add_le_add_rpow
File: Mathlib/Analysis/MeanInequalitiesPow.lean

Proof steps:
state_before: ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp : 0 ≤ p
hp1 : p ≤ 1
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
state_after: case inl
ι : Type u
s : Finset ι
a b : ℝ≥0∞
hp : 0 ≤ 0
hp1 : 0 ≤ 1
⊢ (a + b) ^ 0 ≤ a ^ 0 + b ^ 0

case inr
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp : 0 ≤ p
hp1 : p ≤ 1
hp_pos : 0 < p
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
tactic: rcases hp.eq_or_lt with (rfl | hp_pos)
state_before: case inr
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp : 0 ≤ p
hp1 : p ≤ 1
hp_pos : 0 < p
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
state_after: case inr
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp : 0 ≤ p
hp1 : p ≤ 1
hp_pos : 0 < p
h : (a ^ 1 + b ^ 1) ^ (1 / 1) ≤ (a ^ p + b ^ p) ^ (1 / p)
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
tactic: have h := rpow_add_rpow_le a b hp_pos hp1
state_before: case inr
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp : 0 ≤ p
hp1 : p ≤ 1
hp_pos : 0 < p
h : (a ^ 1 + b ^ 1) ^ (1 / 1) ≤ (a ^ p + b ^ p) ^ (1 / p)
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
state_after: case inr
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp : 0 ≤ p
hp1 : p ≤ 1
hp_pos : 0 < p
h : (a ^ 1 + b ^ 1) ^ 1 ≤ (a ^ p + b ^ p) ^ p⁻¹
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
tactic: rw [one_div_one, one_div] at h
state_before: case inr
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp : 0 ≤ p
hp1 : p ≤ 1
hp_pos : 0 < p
h : (a ^ 1 + b ^ 1) ^ 1 ≤ (a ^ p + b ^ p) ^ p⁻¹
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
state_after: case inr
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp : 0 ≤ p
hp1 : p ≤ 1
hp_pos : 0 < p
h : a + b ≤ (a ^ p + b ^ p) ^ p⁻¹
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
tactic: repeat' rw [ENNReal.rpow_one] at h
state_before: case inr
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp : 0 ≤ p
hp1 : p ≤ 1
hp_pos : 0 < p
h : a + b ≤ (a ^ p + b ^ p) ^ p⁻¹
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
state_after: no goals
tactic: exact (ENNReal.le_rpow_inv_iff hp_pos).mp h
Theorem: tprod_eq_mul_tprod_ite
File: Mathlib/Topology/Algebra/InfiniteSum/Group.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : CommGroup α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalGroup α
f g : β → α
a a₁ a₂ : α
inst✝¹ : T2Space α
inst✝ : DecidableEq β
hf : Multipliable f
b : β
⊢ ∏' (n : β), f n = f b * ∏' (n : β), if n = b then 1 else f n
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : CommGroup α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalGroup α
f g : β → α
a a₁ a₂ : α
inst✝¹ : T2Space α
inst✝ : DecidableEq β
hf : Multipliable f
b : β
⊢ ∏' (n : β), f n = f b * ((∏' (b : β), f b) / f b)
tactic: rw [(hasProd_ite_div_hasProd hf.hasProd b).tprod_eq]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : CommGroup α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalGroup α
f g : β → α
a a₁ a₂ : α
inst✝¹ : T2Space α
inst✝ : DecidableEq β
hf : Multipliable f
b : β
⊢ ∏' (n : β), f n = f b * ((∏' (b : β), f b) / f b)
state_after: no goals
tactic: exact (mul_div_cancel _ _).symm
Theorem: Complex.inv_zero
File: Mathlib/Data/Complex/Basic.lean

Proof steps:
state_before: ⊢ 0⁻¹ = 0
state_after: no goals
tactic: rw [← ofReal_zero, ← ofReal_inv, inv_zero]
Theorem: comp_add_right
File: Mathlib/Algebra/Group/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : Semigroup α
x y : α
⊢ ((fun x_1 => x_1 * x) ∘ fun x => x * y) = fun x_1 => x_1 * (y * x)
state_after: case h
α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : Semigroup α
x y z : α
⊢ ((fun x_1 => x_1 * x) ∘ fun x => x * y) z = z * (y * x)
tactic: ext z
state_before: case h
α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : Semigroup α
x y z : α
⊢ ((fun x_1 => x_1 * x) ∘ fun x => x * y) z = z * (y * x)
state_after: no goals
tactic: simp [mul_assoc]
Theorem: ZNum.zneg_succ
File: Mathlib/Data/Num/Lemmas.lean

Proof steps:
state_before: α : Type u_1
n : ZNum
⊢ -n.succ = (-n).pred
state_after: case neg
α : Type u_1
a✝ : PosNum
⊢ -(neg a✝).succ = (-neg a✝).pred
tactic: cases n <;> try { rfl }
state_before: case neg
α : Type u_1
a✝ : PosNum
⊢ -(neg a✝).succ = (-neg a✝).pred
state_after: case neg
α : Type u_1
a✝ : PosNum
⊢ a✝.pred'.toZNum = (-neg a✝).pred
tactic: rw [succ, Num.zneg_toZNumNeg]
state_before: case neg
α : Type u_1
a✝ : PosNum
⊢ a✝.pred'.toZNum = (-neg a✝).pred
state_after: no goals
tactic: rfl
Theorem: List.Sorted.head!_le
File: Mathlib/Data/List/Sort.lean

Proof steps:
state_before: α : Type u
r : α → α → Prop
a✝ : α
l✝ : List α
inst✝¹ : Inhabited α
inst✝ : Preorder α
a : α
l : List α
h : Sorted (fun x x_1 => x < x_1) l
ha : a ∈ l
⊢ l.head! ≤ a
state_after: α : Type u
r : α → α → Prop
a✝ : α
l✝ : List α
inst✝¹ : Inhabited α
inst✝ : Preorder α
a : α
l : List α
h : Sorted (fun x x_1 => x < x_1) (l.head! :: l.tail)
ha : a ∈ l.head! :: l.tail
⊢ l.head! ≤ a
tactic: rw [← List.cons_head!_tail (List.ne_nil_of_mem ha)] at h ha
state_before: α : Type u
r : α → α → Prop
a✝ : α
l✝ : List α
inst✝¹ : Inhabited α
inst✝ : Preorder α
a : α
l : List α
h : Sorted (fun x x_1 => x < x_1) (l.head! :: l.tail)
ha : a ∈ l.head! :: l.tail
⊢ l.head! ≤ a
state_after: case head
α : Type u
r : α → α → Prop
a : α
l✝ : List α
inst✝¹ : Inhabited α
inst✝ : Preorder α
l : List α
h : Sorted (fun x x_1 => x < x_1) (l.head! :: l.tail)
⊢ l.head! ≤ l.head!

case tail
α : Type u
r : α → α → Prop
a✝¹ : α
l✝ : List α
inst✝¹ : Inhabited α
inst✝ : Preorder α
a : α
l : List α
h : Sorted (fun x x_1 => x < x_1) (l.head! :: l.tail)
a✝ : Mem a l.tail
⊢ l.head! ≤ a
tactic: cases ha
Theorem: RingHom.map_det
File: Mathlib/LinearAlgebra/Matrix/Determinant/Basic.lean

Proof steps:
state_before: m : Type u_1
n : Type u_2
inst✝⁵ : DecidableEq n
inst✝⁴ : Fintype n
inst✝³ : DecidableEq m
inst✝² : Fintype m
R : Type v
inst✝¹ : CommRing R
S : Type w
inst✝ : CommRing S
f : R →+* S
M : Matrix n n R
⊢ f M.det = (f.mapMatrix M).det
state_after: no goals
tactic: simp [Matrix.det_apply', map_sum f, map_prod f]
Theorem: Pell.x_sub_y_dvd_pow
File: Mathlib/NumberTheory/PellMatiyasevic.lean

Proof steps:
state_before: a : ℕ
a1 : 1 < a
y : ℕ
⊢ 2 * ↑a * ↑y - ↑y * ↑y - 1 ∣ yz a1 0 * (↑a - ↑y) + ↑(y ^ 0) - xz a1 0
state_after: no goals
tactic: simp [xz, yz, Int.ofNat_zero, Int.ofNat_one]
state_before: a : ℕ
a1 : 1 < a
y : ℕ
⊢ 2 * ↑a * ↑y - ↑y * ↑y - 1 ∣ yz a1 1 * (↑a - ↑y) + ↑(y ^ 1) - xz a1 1
state_after: no goals
tactic: simp [xz, yz, Int.ofNat_zero, Int.ofNat_one]
state_before: a : ℕ
a1 : 1 < a
y n : ℕ
⊢ 2 * ↑a * ↑y - ↑y * ↑y - 1 ∣ yz a1 (n + 2) * (↑a - ↑y) + ↑(y ^ (n + 2)) - xz a1 (n + 2)
state_after: a : ℕ
a1 : 1 < a
y n : ℕ
this : 2 * ↑a * ↑y - ↑y * ↑y - 1 ∣ ↑(y ^ (n + 2)) - ↑(2 * a) * ↑(y ^ (n + 1)) + ↑(y ^ n)
⊢ 2 * ↑a * ↑y - ↑y * ↑y - 1 ∣ yz a1 (n + 2) * (↑a - ↑y) + ↑(y ^ (n + 2)) - xz a1 (n + 2)
tactic: have : (2 * a * y - y * y - 1 : ℤ) ∣ ↑(y ^ (n + 2)) - ↑(2 * a) * ↑(y ^ (n + 1)) + ↑(y ^ n) :=
      ⟨-↑(y ^ n), by
        simp [_root_.pow_succ, mul_add, Int.ofNat_mul, show ((2 : ℕ) : ℤ) = 2 from rfl, mul_comm,
          mul_left_comm]
        ring⟩
state_before: a : ℕ
a1 : 1 < a
y n : ℕ
this : 2 * ↑a * ↑y - ↑y * ↑y - 1 ∣ ↑(y ^ (n + 2)) - ↑(2 * a) * ↑(y ^ (n + 1)) + ↑(y ^ n)
⊢ 2 * ↑a * ↑y - ↑y * ↑y - 1 ∣ yz a1 (n + 2) * (↑a - ↑y) + ↑(y ^ (n + 2)) - xz a1 (n + 2)
state_after: a : ℕ
a1 : 1 < a
y n : ℕ
this : 2 * ↑a * ↑y - ↑y * ↑y - 1 ∣ ↑(y ^ (n + 2)) - ↑(2 * a) * ↑(y ^ (n + 1)) + ↑(y ^ n)
⊢ 2 * ↑a * ↑y - ↑y * ↑y - 1 ∣
    ↑(y ^ (n + 2)) - ↑(2 * a) * ↑(y ^ (n + 1)) + ↑(y ^ n) +
        ↑(2 * a) * (yz a1 (n + 1) * (↑a - ↑y) + ↑(y ^ (n + 1)) - xz a1 (n + 1)) -
      (yz a1 n * (↑a - ↑y) + ↑(y ^ n) - xz a1 n)
tactic: rw [xz_succ_succ, yz_succ_succ, x_sub_y_dvd_pow_lem ↑(y ^ (n + 2)) ↑(y ^ (n + 1)) ↑(y ^ n)]
state_before: a : ℕ
a1 : 1 < a
y n : ℕ
this : 2 * ↑a * ↑y - ↑y * ↑y - 1 ∣ ↑(y ^ (n + 2)) - ↑(2 * a) * ↑(y ^ (n + 1)) + ↑(y ^ n)
⊢ 2 * ↑a * ↑y - ↑y * ↑y - 1 ∣
    ↑(y ^ (n + 2)) - ↑(2 * a) * ↑(y ^ (n + 1)) + ↑(y ^ n) +
        ↑(2 * a) * (yz a1 (n + 1) * (↑a - ↑y) + ↑(y ^ (n + 1)) - xz a1 (n + 1)) -
      (yz a1 n * (↑a - ↑y) + ↑(y ^ n) - xz a1 n)
state_after: no goals
tactic: exact _root_.dvd_sub (dvd_add this <| (x_sub_y_dvd_pow _ (n + 1)).mul_left _)
      (x_sub_y_dvd_pow _ n)
Theorem: disjoint_assoc
File: Mathlib/Order/Disjoint.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : SemilatticeInf α
inst✝ : OrderBot α
a b c d : α
⊢ Disjoint (a ⊓ b) c ↔ Disjoint a (b ⊓ c)
state_after: no goals
tactic: rw [disjoint_iff_inf_le, disjoint_iff_inf_le, inf_assoc]
Theorem: Nat.Coprime.addOrderOf_nsmul
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 : ℕ
h : (orderOf y).Coprime m
⊢ orderOf (y ^ m) = orderOf y
state_after: case pos
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 : ℕ
h : (orderOf y).Coprime m
hg : IsOfFinOrder y
⊢ orderOf (y ^ m) = orderOf y

case neg
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 : ℕ
h : (orderOf y).Coprime m
hg : ¬IsOfFinOrder y
⊢ orderOf (y ^ m) = orderOf y
tactic: by_cases hg : IsOfFinOrder y
Theorem: Polynomial.modByMonic_X_sub_C_eq_C_eval
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✝ : CommRing R
p✝ q p : R[X]
a : R
⊢ p %ₘ (X - C a) = C (eval a p)
state_after: R : Type u
S : Type v
T : Type w
A : Type z
a✝¹ b : R
n : ℕ
inst✝ : CommRing R
p✝ q p : R[X]
a : R
a✝ : Nontrivial R
⊢ p %ₘ (X - C a) = C (eval a p)
tactic: nontriviality R
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝¹ b : R
n : ℕ
inst✝ : CommRing R
p✝ q p : R[X]
a : R
a✝ : Nontrivial R
⊢ p %ₘ (X - C a) = C (eval a p)
state_after: R : Type u
S : Type v
T : Type w
A : Type z
a✝¹ b : R
n : ℕ
inst✝ : CommRing R
p✝ q p : R[X]
a : R
a✝ : Nontrivial R
h : eval a (p %ₘ (X - C a)) = eval a p
⊢ p %ₘ (X - C a) = C (eval a p)
tactic: have h : (p %ₘ (X - C a)).eval a = p.eval a := by
    rw [modByMonic_eq_sub_mul_div _ (monic_X_sub_C a), eval_sub, eval_mul, eval_sub, eval_X,
      eval_C, sub_self, zero_mul, sub_zero]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝¹ b : R
n : ℕ
inst✝ : CommRing R
p✝ q p : R[X]
a : R
a✝ : Nontrivial R
h : eval a (p %ₘ (X - C a)) = eval a p
⊢ p %ₘ (X - C a) = C (eval a p)
state_after: R : Type u
S : Type v
T : Type w
A : Type z
a✝¹ b : R
n : ℕ
inst✝ : CommRing R
p✝ q p : R[X]
a : R
a✝ : Nontrivial R
h : eval a (p %ₘ (X - C a)) = eval a p
this : (p %ₘ (X - C a)).degree < 1
⊢ p %ₘ (X - C a) = C (eval a p)
tactic: have : degree (p %ₘ (X - C a)) < 1 :=
    degree_X_sub_C a ▸ degree_modByMonic_lt p (monic_X_sub_C a)
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝¹ b : R
n : ℕ
inst✝ : CommRing R
p✝ q p : R[X]
a : R
a✝ : Nontrivial R
h : eval a (p %ₘ (X - C a)) = eval a p
this✝ : (p %ₘ (X - C a)).degree < 1
this : (p %ₘ (X - C a)).degree ≤ 0
⊢ p %ₘ (X - C a) = C (eval a p)
state_after: R : Type u
S : Type v
T : Type w
A : Type z
a✝¹ b : R
n : ℕ
inst✝ : CommRing R
p✝ q p : R[X]
a : R
a✝ : Nontrivial R
h : (p %ₘ (X - C a)).coeff 0 = eval a p
this✝ : (p %ₘ (X - C a)).degree < 1
this : (p %ₘ (X - C a)).degree ≤ 0
⊢ p %ₘ (X - C a) = C (eval a p)
tactic: rw [eq_C_of_degree_le_zero this, eval_C] at h
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝¹ b : R
n : ℕ
inst✝ : CommRing R
p✝ q p : R[X]
a : R
a✝ : Nontrivial R
h : (p %ₘ (X - C a)).coeff 0 = eval a p
this✝ : (p %ₘ (X - C a)).degree < 1
this : (p %ₘ (X - C a)).degree ≤ 0
⊢ p %ₘ (X - C a) = C (eval a p)
state_after: no goals
tactic: rw [eq_C_of_degree_le_zero this, h]
Theorem: tsub_le_tsub_add_tsub
File: Mathlib/Algebra/Order/Sub/Defs.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
inst✝³ : AddCommSemigroup α
inst✝² : Sub α
inst✝¹ : OrderedSub α
a b c d : α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
⊢ a - c ≤ a - b + (b - c)
state_after: α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
inst✝³ : AddCommSemigroup α
inst✝² : Sub α
inst✝¹ : OrderedSub α
a b c d : α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
⊢ a ≤ c + (b - c) + (a - b)
tactic: rw [tsub_le_iff_left, ← add_assoc, add_right_comm]
state_before: α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
inst✝³ : AddCommSemigroup α
inst✝² : Sub α
inst✝¹ : OrderedSub α
a b c d : α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
⊢ a ≤ c + (b - c) + (a - b)
state_after: no goals
tactic: exact le_add_tsub.trans (add_le_add_right le_add_tsub _)
Theorem: GradedTensorProduct.includeLeftRingHom_apply
File: Mathlib/LinearAlgebra/TensorProduct/Graded/Internal.lean

Proof steps:
state_before: R : Type u_1
ι : Type u_2
A : Type u_3
B : Type u_4
inst✝⁹ : CommSemiring ι
inst✝⁸ : Module ι (Additive ℤˣ)
inst✝⁷ : DecidableEq ι
inst✝⁶ : CommRing R
inst✝⁵ : Ring A
inst✝⁴ : Ring B
inst✝³ : Algebra R A
inst✝² : Algebra R B
𝒜 : ι → Submodule R A
ℬ : ι → Submodule R B
inst✝¹ : GradedAlgebra 𝒜
inst✝ : GradedAlgebra ℬ
⊢ (↑{ toFun := fun a => a ᵍ⊗ₜ[R] 1, map_one' := ⋯, map_mul' := ⋯ }).toFun 0 = 0
state_after: no goals
tactic: simp
state_before: R : Type u_1
ι : Type u_2
A : Type u_3
B : Type u_4
inst✝⁹ : CommSemiring ι
inst✝⁸ : Module ι (Additive ℤˣ)
inst✝⁷ : DecidableEq ι
inst✝⁶ : CommRing R
inst✝⁵ : Ring A
inst✝⁴ : Ring B
inst✝³ : Algebra R A
inst✝² : Algebra R B
𝒜 : ι → Submodule R A
ℬ : ι → Submodule R B
inst✝¹ : GradedAlgebra 𝒜
inst✝ : GradedAlgebra ℬ
⊢ ∀ (x y : A),
    (↑{ toFun := fun a => a ᵍ⊗ₜ[R] 1, map_one' := ⋯, map_mul' := ⋯ }).toFun (x + y) =
      (↑{ toFun := fun a => a ᵍ⊗ₜ[R] 1, map_one' := ⋯, map_mul' := ⋯ }).toFun x +
        (↑{ toFun := fun a => a ᵍ⊗ₜ[R] 1, map_one' := ⋯, map_mul' := ⋯ }).toFun y
state_after: no goals
tactic: simp [tmul, TensorProduct.add_tmul]
state_before: R : Type u_1
ι : Type u_2
A : Type u_3
B : Type u_4
inst✝⁹ : CommSemiring ι
inst✝⁸ : Module ι (Additive ℤˣ)
inst✝⁷ : DecidableEq ι
inst✝⁶ : CommRing R
inst✝⁵ : Ring A
inst✝⁴ : Ring B
inst✝³ : Algebra R A
inst✝² : Algebra R B
𝒜 : ι → Submodule R A
ℬ : ι → Submodule R B
inst✝¹ : GradedAlgebra 𝒜
inst✝ : GradedAlgebra ℬ
a₁ a₂ : A
⊢ { toFun := fun a => a ᵍ⊗ₜ[R] 1, map_one' := ⋯ }.toFun (a₁ * a₂) =
    { toFun := fun a => a ᵍ⊗ₜ[R] 1, map_one' := ⋯ }.toFun a₁ * { toFun := fun a => a ᵍ⊗ₜ[R] 1, map_one' := ⋯ }.toFun a₂
state_after: R : Type u_1
ι : Type u_2
A : Type u_3
B : Type u_4
inst✝⁹ : CommSemiring ι
inst✝⁸ : Module ι (Additive ℤˣ)
inst✝⁷ : DecidableEq ι
inst✝⁶ : CommRing R
inst✝⁵ : Ring A
inst✝⁴ : Ring B
inst✝³ : Algebra R A
inst✝² : Algebra R B
𝒜 : ι → Submodule R A
ℬ : ι → Submodule R B
inst✝¹ : GradedAlgebra 𝒜
inst✝ : GradedAlgebra ℬ
a₁ a₂ : A
⊢ (a₁ * a₂) ᵍ⊗ₜ[R] 1 = a₁ ᵍ⊗ₜ[R] 1 * a₂ ᵍ⊗ₜ[R] 1
tactic: dsimp
state_before: R : Type u_1
ι : Type u_2
A : Type u_3
B : Type u_4
inst✝⁹ : CommSemiring ι
inst✝⁸ : Module ι (Additive ℤˣ)
inst✝⁷ : DecidableEq ι
inst✝⁶ : CommRing R
inst✝⁵ : Ring A
inst✝⁴ : Ring B
inst✝³ : Algebra R A
inst✝² : Algebra R B
𝒜 : ι → Submodule R A
ℬ : ι → Submodule R B
inst✝¹ : GradedAlgebra 𝒜
inst✝ : GradedAlgebra ℬ
a₁ a₂ : A
⊢ (a₁ * a₂) ᵍ⊗ₜ[R] 1 = a₁ ᵍ⊗ₜ[R] 1 * a₂ ᵍ⊗ₜ[R] 1
state_after: no goals
tactic: classical
    rw [← DirectSum.sum_support_decompose 𝒜 a₂, Finset.mul_sum]
    simp_rw [tmul, sum_tmul, map_sum, Finset.mul_sum]
    congr
    ext i
    rw [← SetLike.coe_gOne ℬ, tmul_coe_mul_coe_tmul, zero_mul, uzpow_zero, one_smul,
      SetLike.coe_gOne, one_mul]
Theorem: DirectSum.ofPow
File: Mathlib/Algebra/DirectSum/Ring.lean

Proof steps:
state_before: ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
i : ι
a : A i
n : ℕ
⊢ (of A i) a ^ n = (of A (n • i)) (GradedMonoid.GMonoid.gnpow n a)
state_after: case zero
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
i : ι
a : A i
⊢ (of A i) a ^ 0 = (of A (0 • i)) (GradedMonoid.GMonoid.gnpow 0 a)

case succ
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
i : ι
a : A i
n : ℕ
n_ih : (of A i) a ^ n = (of A (n • i)) (GradedMonoid.GMonoid.gnpow n a)
⊢ (of A i) a ^ (n + 1) = (of A ((n + 1) • i)) (GradedMonoid.GMonoid.gnpow (n + 1) a)
tactic: induction' n with n n_ih
Theorem: HomologicalComplex.opcyclesMap_comp_descOpcycles
File: Mathlib/Algebra/Homology/ShortComplex/HomologicalComplex.lean

Proof steps:
state_before: C : Type u_1
inst✝⁴ : Category.{?u.99905, u_1} C
inst✝³ : HasZeroMorphisms C
ι : Type u_2
c : ComplexShape ι
K L M : HomologicalComplex C c
φ✝ : K ⟶ L
ψ : L ⟶ M
i j✝ k✝ : ι
inst✝² : K.HasHomology i
inst✝¹ : L.HasHomology i
inst✝ : M.HasHomology i
A : C
k : L.X i ⟶ A
j : ι
hj : c.prev i = j
hk : L.d j i ≫ k = 0
φ : K ⟶ L
⊢ K.d j i ≫ φ.f i ≫ k = 0
state_after: no goals
tactic: rw [← φ.comm_assoc, hk, comp_zero]
state_before: C : Type u_1
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : HasZeroMorphisms C
ι : Type u_2
c : ComplexShape ι
K L M : HomologicalComplex C c
φ✝ : K ⟶ L
ψ : L ⟶ M
i j✝ k✝ : ι
inst✝² : K.HasHomology i
inst✝¹ : L.HasHomology i
inst✝ : M.HasHomology i
A : C
k : L.X i ⟶ A
j : ι
hj : c.prev i = j
hk : L.d j i ≫ k = 0
φ : K ⟶ L
⊢ opcyclesMap φ i ≫ L.descOpcycles k j hj hk = K.descOpcycles (φ.f i ≫ k) j hj ⋯
state_after: no goals
tactic: simp only [← cancel_epi (K.pOpcycles i), p_opcyclesMap_assoc, p_descOpcycles]
Theorem: Real.sq_le
File: Mathlib/Data/Real/Sqrt.lean

Proof steps:
state_before: x y : ℝ
h : 0 ≤ y
⊢ x ^ 2 ≤ y ↔ -√y ≤ x ∧ x ≤ √y
state_after: case mp
x y : ℝ
h : 0 ≤ y
⊢ x ^ 2 ≤ y → -√y ≤ x ∧ x ≤ √y

case mpr
x y : ℝ
h : 0 ≤ y
⊢ -√y ≤ x ∧ x ≤ √y → x ^ 2 ≤ y
tactic: constructor
Theorem: Stream'.WSeq.drop.aux_none
File: Mathlib/Data/Seq/WSeq.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
n : ℕ
⊢ (Computation.pure none).bind (aux n) = Computation.pure none
state_after: no goals
tactic: rw [ret_bind, drop.aux_none n]
Theorem: PartENat.ofENat_le
File: Mathlib/Data/Nat/PartENat.lean

Proof steps:
state_before: x y : ℕ∞
⊢ ↑x ≤ ↑y ↔ x ≤ y
state_after: no goals
tactic: classical
  rw [← toWithTop_le, toWithTop_ofENat, toWithTop_ofENat]
Theorem: absorbs_iff_eventually_nhds_zero
File: Mathlib/Analysis/LocallyConvex/Basic.lean

Proof steps:
state_before: 𝕜 : Type u_1
𝕝 : Type u_2
E : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝² : NormedDivisionRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
s t : Set E
x : E
a b : 𝕜
h₀ : 0 ∈ s
⊢ Absorbs 𝕜 s t ↔ ∀ᶠ (c : 𝕜) in 𝓝 0, MapsTo (fun x => c • x) t s
state_after: 𝕜 : Type u_1
𝕝 : Type u_2
E : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝² : NormedDivisionRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
s t : Set E
x : E
a b : 𝕜
h₀ : 0 ∈ s
⊢ MapsTo (fun x => 0 • x) t s
tactic: rw [← nhdsWithin_compl_singleton_sup_pure, Filter.eventually_sup, Filter.eventually_pure,
    ← absorbs_iff_eventually_nhdsWithin_zero, and_iff_left]
state_before: 𝕜 : Type u_1
𝕝 : Type u_2
E : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝² : NormedDivisionRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
s t : Set E
x : E
a b : 𝕜
h₀ : 0 ∈ s
⊢ MapsTo (fun x => 0 • x) t s
state_after: 𝕜 : Type u_1
𝕝 : Type u_2
E : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝² : NormedDivisionRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
s t : Set E
x✝ : E
a b : 𝕜
h₀ : 0 ∈ s
x : E
a✝ : x ∈ t
⊢ (fun x => 0 • x) x ∈ s
tactic: intro x _
state_before: 𝕜 : Type u_1
𝕝 : Type u_2
E : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝² : NormedDivisionRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
s t : Set E
x✝ : E
a b : 𝕜
h₀ : 0 ∈ s
x : E
a✝ : x ∈ t
⊢ (fun x => 0 • x) x ∈ s
state_after: no goals
tactic: simpa only [zero_smul]
Theorem: MeasureTheory.Adapted.measurable_upcrossingsBefore
File: Mathlib/Probability/Martingale/Upcrossing.lean

Proof steps:
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
a b : ℝ
f : ℕ → Ω → ℝ
N n m : ℕ
ω : Ω
ℱ : Filtration ℕ m0
hf : Adapted ℱ f
hab : a < b
⊢ Measurable (upcrossingsBefore a b f N)
state_after: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
a b : ℝ
f : ℕ → Ω → ℝ
N n m : ℕ
ω : Ω
ℱ : Filtration ℕ m0
hf : Adapted ℱ f
hab : a < b
this :
  upcrossingsBefore a b f N = fun ω => ∑ i ∈ Finset.Ico 1 (N + 1), {n | upperCrossingTime a b f N n ω < N}.indicator 1 i
⊢ Measurable (upcrossingsBefore a b f N)
tactic: have : upcrossingsBefore a b f N = fun ω =>
      ∑ i ∈ Finset.Ico 1 (N + 1), {n | upperCrossingTime a b f N n ω < N}.indicator 1 i := by
    ext ω
    exact upcrossingsBefore_eq_sum hab
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
a b : ℝ
f : ℕ → Ω → ℝ
N n m : ℕ
ω : Ω
ℱ : Filtration ℕ m0
hf : Adapted ℱ f
hab : a < b
this :
  upcrossingsBefore a b f N = fun ω => ∑ i ∈ Finset.Ico 1 (N + 1), {n | upperCrossingTime a b f N n ω < N}.indicator 1 i
⊢ Measurable (upcrossingsBefore a b f N)
state_after: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
a b : ℝ
f : ℕ → Ω → ℝ
N n m : ℕ
ω : Ω
ℱ : Filtration ℕ m0
hf : Adapted ℱ f
hab : a < b
this :
  upcrossingsBefore a b f N = fun ω => ∑ i ∈ Finset.Ico 1 (N + 1), {n | upperCrossingTime a b f N n ω < N}.indicator 1 i
⊢ Measurable fun ω => ∑ i ∈ Finset.Ico 1 (N + 1), {n | upperCrossingTime a b f N n ω < N}.indicator 1 i
tactic: rw [this]
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
a b : ℝ
f : ℕ → Ω → ℝ
N n m : ℕ
ω : Ω
ℱ : Filtration ℕ m0
hf : Adapted ℱ f
hab : a < b
this :
  upcrossingsBefore a b f N = fun ω => ∑ i ∈ Finset.Ico 1 (N + 1), {n | upperCrossingTime a b f N n ω < N}.indicator 1 i
⊢ Measurable fun ω => ∑ i ∈ Finset.Ico 1 (N + 1), {n | upperCrossingTime a b f N n ω < N}.indicator 1 i
state_after: no goals
tactic: exact Finset.measurable_sum _ fun i _ => Measurable.indicator measurable_const <|
    ℱ.le N _ (hf.isStoppingTime_upperCrossingTime.measurableSet_lt_of_pred N)