1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: SetTheory.PGame.zero_lf
File: Mathlib/SetTheory/Game/PGame.lean

tactic: rw [lf_def]
state_before: xl xr : Type u
x : PGame
⊢ 0 ⧏ x ↔ ∃ i, ∀ (j : (x.moveLeft i).RightMoves), 0 ⧏ (x.moveLeft i).moveRight j
state_after: xl xr : Type u
x : PGame
⊢ ((∃ i,
        (∀ (i' : LeftMoves 0), moveLeft 0 i' ⧏ x.moveLeft i) ∧
          ∀ (j : (x.moveLeft i).RightMoves), 0 ⧏ (x.moveLeft i).moveRight j) ∨
      ∃ j,
        (∀ (i : (moveRight 0 j).LeftMoves), (moveRight 0 j).moveLeft i ⧏ x) ∧
          ∀ (j' : x.RightMoves), moveRight 0 j ⧏ x.moveRight j') ↔
    ∃ i, ∀ (j : (x.moveLeft i).RightMoves), 0 ⧏ (x.moveLeft i).moveRight j

tactic: simp
state_before: xl xr : Type u
x : PGame
⊢ ((∃ i,
        (∀ (i' : LeftMoves 0), moveLeft 0 i' ⧏ x.moveLeft i) ∧
          ∀ (j : (x.moveLeft i).RightMoves), 0 ⧏ (x.moveLeft i).moveRight j) ∨
      ∃ j,
        (∀ (i : (moveRight 0 j).LeftMoves), (moveRight 0 j).moveLeft i ⧏ x) ∧
          ∀ (j' : x.RightMoves), moveRight 0 j ⧏ x.moveRight j') ↔
    ∃ i, ∀ (j : (x.moveLeft i).RightMoves), 0 ⧏ (x.moveLeft i).moveRight j
state_after: no goals
Theorem: Batteries.RBNode.balance2_eq
File: .lake/packages/batteries/Batteries/Data/RBMap/WF.lean

tactic: simp [balance1_eq hr.reverse]
state_before: α : Type u_1
c : RBColor
n : Nat
l : RBNode α
v : α
r : RBNode α
hr : r.Balanced c n
⊢ (l.balance2 v r).reverse.reverse = node black l v r
state_after: no goals
Theorem: toMatrix_rotation
File: Mathlib/Analysis/Complex/Isometry.lean

tactic: simp [pow_two, ← normSq_apply]
state_before: a : ↥circle
⊢ (↑a).re ^ 2 + (↑a).im ^ 2 ≠ 0
state_after: no goals

tactic: ext i j
state_before: a : ↥circle
⊢ (LinearMap.toMatrix basisOneI basisOneI) ↑(rotation a).toLinearEquiv =
    ↑(Matrix.planeConformalMatrix (↑a).re (↑a).im ⋯)
state_after: case a
a : ↥circle
i j : Fin 2
⊢ (LinearMap.toMatrix basisOneI basisOneI) (↑(rotation a).toLinearEquiv) i j =
    ↑(Matrix.planeConformalMatrix (↑a).re (↑a).im ⋯) i j

tactic: simp only [LinearMap.toMatrix_apply, coe_basisOneI, LinearEquiv.coe_coe,
  LinearIsometryEquiv.coe_toLinearEquiv, rotation_apply, coe_basisOneI_repr, mul_re, mul_im,
  Matrix.val_planeConformalMatrix, Matrix.of_apply, Matrix.cons_val', Matrix.empty_val',
  Matrix.cons_val_fin_one]
state_before: case a
a : ↥circle
i j : Fin 2
⊢ (LinearMap.toMatrix basisOneI basisOneI) (↑(rotation a).toLinearEquiv) i j =
    ↑(Matrix.planeConformalMatrix (↑a).re (↑a).im ⋯) i j
state_after: case a
a : ↥circle
i j : Fin 2
⊢ ![(↑a).re * (![1, I] j).re - (↑a).im * (![1, I] j).im, (↑a).re * (![1, I] j).im + (↑a).im * (![1, I] j).re] i =
    Matrix.vecCons (![(↑a).re, -(↑a).im] j) (fun i => ![(↑a).im, (↑a).re] j) i

tactic: fin_cases i <;> fin_cases j <;> simp
state_before: case a
a : ↥circle
i j : Fin 2
⊢ ![(↑a).re * (![1, I] j).re - (↑a).im * (![1, I] j).im, (↑a).re * (![1, I] j).im + (↑a).im * (![1, I] j).re] i =
    Matrix.vecCons (![(↑a).re, -(↑a).im] j) (fun i => ![(↑a).im, (↑a).re] j) i
state_after: no goals
Theorem: Fintype.prod_subset
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

tactic: simpa [not_imp_comm (a := _ ∈ s)]
state_before: ι✝ : Type u_1
κ✝ : Type u_2
α✝ : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α✝
a : α✝
f✝ g : α✝ → β
ι : Type u_6
κ : Type u_7
α : Type u_8
inst✝² : Fintype ι
inst✝¹ : Fintype κ
inst✝ : CommMonoid α
s : Finset ι
f : ι → α
h : ∀ (i : ι), f i ≠ 1 → i ∈ s
⊢ ∀ x ∈ univ, x ∉ s → f x = 1
state_after: no goals
Theorem: MeasureTheory.SimpleFunc.norm_approxOn_zero_le
File: Mathlib/MeasureTheory/Function/SimpleFuncDenseLp.lean

tactic: have := edist_approxOn_y0_le hf h₀ x n
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace E
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
q : ℝ
p : ℝ≥0∞
inst✝¹ : OpensMeasurableSpace E
f : β → E
hf : Measurable f
s : Set E
h₀ : 0 ∈ s
inst✝ : SeparableSpace ↑s
x : β
n : ℕ
⊢ ‖↑(approxOn f hf s 0 h₀ n) x‖ ≤ ‖f x‖ + ‖f x‖
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace E
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
q : ℝ
p : ℝ≥0∞
inst✝¹ : OpensMeasurableSpace E
f : β → E
hf : Measurable f
s : Set E
h₀ : 0 ∈ s
inst✝ : SeparableSpace ↑s
x : β
n : ℕ
this : edist 0 (↑(approxOn f hf s 0 h₀ n) x) ≤ edist 0 (f x) + edist 0 (f x)
⊢ ‖↑(approxOn f hf s 0 h₀ n) x‖ ≤ ‖f x‖ + ‖f x‖

tactic: simp [edist_comm (0 : E), edist_eq_coe_nnnorm] at this
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace E
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
q : ℝ
p : ℝ≥0∞
inst✝¹ : OpensMeasurableSpace E
f : β → E
hf : Measurable f
s : Set E
h₀ : 0 ∈ s
inst✝ : SeparableSpace ↑s
x : β
n : ℕ
this : edist 0 (↑(approxOn f hf s 0 h₀ n) x) ≤ edist 0 (f x) + edist 0 (f x)
⊢ ‖↑(approxOn f hf s 0 h₀ n) x‖ ≤ ‖f x‖ + ‖f x‖
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace E
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
q : ℝ
p : ℝ≥0∞
inst✝¹ : OpensMeasurableSpace E
f : β → E
hf : Measurable f
s : Set E
h₀ : 0 ∈ s
inst✝ : SeparableSpace ↑s
x : β
n : ℕ
this : ↑‖↑(approxOn f hf s 0 h₀ n) x‖₊ ≤ ↑‖f x‖₊ + ↑‖f x‖₊
⊢ ‖↑(approxOn f hf s 0 h₀ n) x‖ ≤ ‖f x‖ + ‖f x‖

tactic: exact mod_cast this
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace E
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
q : ℝ
p : ℝ≥0∞
inst✝¹ : OpensMeasurableSpace E
f : β → E
hf : Measurable f
s : Set E
h₀ : 0 ∈ s
inst✝ : SeparableSpace ↑s
x : β
n : ℕ
this : ↑‖↑(approxOn f hf s 0 h₀ n) x‖₊ ≤ ↑‖f x‖₊ + ↑‖f x‖₊
⊢ ‖↑(approxOn f hf s 0 h₀ n) x‖ ≤ ‖f x‖ + ‖f x‖
state_after: no goals
Theorem: mul_ite_zero
File: Mathlib/Algebra/Ring/Defs.lean

tactic: simp
state_before: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝² : MulZeroClass α
P Q : Prop
inst✝¹ : Decidable P
inst✝ : Decidable Q
a b : α
⊢ (a * if P then b else 0) = if P then a * b else 0
state_after: no goals
Theorem: Matrix.det_smul_of_tower
File: Mathlib/LinearAlgebra/Matrix/Determinant/Basic.lean

tactic: rw [← smul_one_smul R c A, det_smul, smul_pow, one_pow, smul_mul_assoc, one_mul]
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
α : Type u_3
inst✝³ : Monoid α
inst✝² : DistribMulAction α R
inst✝¹ : IsScalarTower α R R
inst✝ : SMulCommClass α R R
c : α
A : Matrix n n R
⊢ (c • A).det = c ^ Fintype.card n • A.det
state_after: no goals
Theorem: Submodule.pow_eq_span_pow_set
File: Mathlib/Algebra/Algebra/Operations.lean

tactic: rw [← span_pow, span_eq]
state_before: ι : Sort uι
R : Type u
inst✝² : CommSemiring R
A : Type v
inst✝¹ : Semiring A
inst✝ : Algebra R A
S T : Set A
M N P Q : Submodule R A
m n✝ : A
n : ℕ
⊢ M ^ n = span R (↑M ^ n)
state_after: no goals
Theorem: MvPolynomial.isHomogeneous_X
File: Mathlib/RingTheory/MvPolynomial/Homogeneous.lean

tactic: apply isHomogeneous_monomial
state_before: σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
inst✝¹ inst✝ : CommSemiring R
i : σ
⊢ (X i).IsHomogeneous 1
state_after: case hn
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
inst✝¹ inst✝ : CommSemiring R
i : σ
⊢ degree (Finsupp.single i 1) = 1

tactic: rw [degree, Finsupp.support_single_ne_zero _ one_ne_zero, Finset.sum_singleton]
state_before: case hn
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
inst✝¹ inst✝ : CommSemiring R
i : σ
⊢ degree (Finsupp.single i 1) = 1
state_after: case hn
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
inst✝¹ inst✝ : CommSemiring R
i : σ
⊢ (Finsupp.single i 1) i = 1

tactic: exact Finsupp.single_eq_same
state_before: case hn
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
inst✝¹ inst✝ : CommSemiring R
i : σ
⊢ (Finsupp.single i 1) i = 1
state_after: no goals
Theorem: OmegaCompletePartialOrder.ContinuousHom.ite_continuous'
File: Mathlib/Order/OmegaCompletePartialOrder.lean

tactic: split_ifs <;> simp [*]
state_before: α : Type u
α' : Type u_1
β : Type v
β' : Type u_2
γ : Type u_3
φ : Type u_4
inst✝⁵ : OmegaCompletePartialOrder α
inst✝⁴ : OmegaCompletePartialOrder β
inst✝³ : OmegaCompletePartialOrder γ
inst✝² : OmegaCompletePartialOrder φ
inst✝¹ : OmegaCompletePartialOrder α'
inst✝ : OmegaCompletePartialOrder β'
p : Prop
hp : Decidable p
f g : α → β
hf : Continuous' f
hg : Continuous' g
⊢ Continuous' fun x => if p then f x else g x
state_after: no goals
Theorem: LocallyBoundedMap.cancel_left
File: Mathlib/Topology/Bornology/Hom.lean

tactic: rw [← comp_apply, h, comp_apply]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
inst✝⁴ : FunLike F α β
inst✝³ : Bornology α
inst✝² : Bornology β
inst✝¹ : Bornology γ
inst✝ : Bornology δ
g : LocallyBoundedMap β γ
f₁ f₂ : LocallyBoundedMap α β
hg : Injective ⇑g
h : g.comp f₁ = g.comp f₂
a : α
⊢ g (f₁ a) = g (f₂ a)
state_after: no goals
Theorem: OrderIso.preimage_Ioc
File: Mathlib/Order/Interval/Set/OrderIso.lean

tactic: simp [← Ioi_inter_Iic]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : Preorder β
e : α ≃o β
a b : β
⊢ ⇑e ⁻¹' Ioc a b = Ioc (e.symm a) (e.symm b)
state_after: no goals
Theorem: CategoryTheory.Comonad.coalgebra_iso_of_iso
File: Mathlib/CategoryTheory/Monad/Algebra.lean

tactic: rw [IsIso.eq_inv_comp f.f, ← f.h_assoc]
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
G : Comonad C
A B : G.Coalgebra
f : A ⟶ B
inst✝ : IsIso f.f
⊢ B.a ≫ G.map (inv f.f) = inv f.f ≫ A.a
state_after: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
G : Comonad C
A B : G.Coalgebra
f : A ⟶ B
inst✝ : IsIso f.f
⊢ A.a ≫ G.map f.f ≫ G.map (inv f.f) = A.a

tactic: simp
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
G : Comonad C
A B : G.Coalgebra
f : A ⟶ B
inst✝ : IsIso f.f
⊢ A.a ≫ G.map f.f ≫ G.map (inv f.f) = A.a
state_after: no goals

tactic: aesop_cat
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
G : Comonad C
A B : G.Coalgebra
f : A ⟶ B
inst✝ : IsIso f.f
⊢ f ≫ { f := inv f.f, h := ⋯ } = 𝟙 A ∧ { f := inv f.f, h := ⋯ } ≫ f = 𝟙 B
state_after: no goals
Theorem: IsPrimePow.minFac_pow_factorization_eq
File: Mathlib/Data/Nat/Factorization/PrimePow.lean

tactic: obtain ⟨p, k, hp, hk, rfl⟩ := hn
state_before: R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p : R
k n : ℕ
hn : IsPrimePow n
⊢ n.minFac ^ n.factorization n.minFac = n
state_after: case intro.intro.intro.intro
R : Type u_1
inst✝ : CommMonoidWithZero R
n p✝ : R
k✝ p k : ℕ
hp : Prime p
hk : 0 < k
⊢ (p ^ k).minFac ^ (p ^ k).factorization (p ^ k).minFac = p ^ k

tactic: rw [← Nat.prime_iff] at hp
state_before: case intro.intro.intro.intro
R : Type u_1
inst✝ : CommMonoidWithZero R
n p✝ : R
k✝ p k : ℕ
hp : Prime p
hk : 0 < k
⊢ (p ^ k).minFac ^ (p ^ k).factorization (p ^ k).minFac = 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 ^ k).minFac ^ (p ^ k).factorization (p ^ k).minFac = p ^ k

tactic: rw [hp.pow_minFac hk.ne', hp.factorization_pow, Finsupp.single_eq_same]
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 ^ k).minFac ^ (p ^ k).factorization (p ^ k).minFac = p ^ k
state_after: no goals
Theorem: Bornology.isBounded_singleton
File: Mathlib/Topology/Bornology/Basic.lean

tactic: rw [isBounded_def]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
x✝ : Bornology α
s t : Set α
x : α
⊢ IsBounded {x}
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
x✝ : Bornology α
s t : Set α
x : α
⊢ {x}ᶜ ∈ cobounded α

tactic: exact le_cofinite _ (finite_singleton x).compl_mem_cofinite
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
x✝ : Bornology α
s t : Set α
x : α
⊢ {x}ᶜ ∈ cobounded α
state_after: no goals
Theorem: NNReal.rpow_arith_mean_le_arith_mean2_rpow
File: Mathlib/Analysis/MeanInequalitiesPow.lean

tactic: have h := rpow_arith_mean_le_arith_mean_rpow univ ![w₁, w₂] ![z₁, z₂] ?_ hp
state_before: ι : Type u
s : Finset ι
w₁ w₂ z₁ z₂ : ℝ≥0
hw' : w₁ + w₂ = 1
p : ℝ
hp : 1 ≤ p
⊢ (w₁ * z₁ + w₂ * z₂) ^ p ≤ w₁ * z₁ ^ p + w₂ * z₂ ^ p
state_after: case refine_2
ι : Type u
s : Finset ι
w₁ w₂ z₁ z₂ : ℝ≥0
hw' : w₁ + w₂ = 1
p : ℝ
hp : 1 ≤ p
h :
  (∑ i : Fin (Nat.succ 0).succ, ![w₁, w₂] i * ![z₁, z₂] i) ^ p ≤
    ∑ i : Fin (Nat.succ 0).succ, ![w₁, w₂] i * ![z₁, z₂] i ^ p
⊢ (w₁ * z₁ + w₂ * z₂) ^ p ≤ w₁ * z₁ ^ p + w₂ * z₂ ^ p

case refine_1
ι : Type u
s : Finset ι
w₁ w₂ z₁ z₂ : ℝ≥0
hw' : w₁ + w₂ = 1
p : ℝ
hp : 1 ≤ p
⊢ ∑ i : Fin (Nat.succ 0).succ, ![w₁, w₂] i = 1

tactic: simpa [Fin.sum_univ_succ] using h
state_before: case refine_2
ι : Type u
s : Finset ι
w₁ w₂ z₁ z₂ : ℝ≥0
hw' : w₁ + w₂ = 1
p : ℝ
hp : 1 ≤ p
h :
  (∑ i : Fin (Nat.succ 0).succ, ![w₁, w₂] i * ![z₁, z₂] i) ^ p ≤
    ∑ i : Fin (Nat.succ 0).succ, ![w₁, w₂] i * ![z₁, z₂] i ^ p
⊢ (w₁ * z₁ + w₂ * z₂) ^ p ≤ w₁ * z₁ ^ p + w₂ * z₂ ^ p
state_after: no goals

tactic: simp [hw', Fin.sum_univ_succ]
state_before: case refine_1
ι : Type u
s : Finset ι
w₁ w₂ z₁ z₂ : ℝ≥0
hw' : w₁ + w₂ = 1
p : ℝ
hp : 1 ≤ p
⊢ ∑ i : Fin (Nat.succ 0).succ, ![w₁, w₂] i = 1
state_after: no goals
Theorem: QuadraticForm.associated_sq
File: Mathlib/LinearAlgebra/QuadraticForm/Basic.lean

tactic: simp only [smul_add, invOf_two_smul_add_invOf_two_smul]
state_before: S : Type u_1
T : Type u_2
R : Type u_3
M : Type u_4
N : Type u_5
inst✝⁵ : CommSemiring S
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Algebra S R
inst✝¹ : Module R M
inst✝ : Invertible 2
⊢ ⅟2 • ((mul R R).compl₁₂ LinearMap.id LinearMap.id + (mul R R).compl₁₂ LinearMap.id LinearMap.id) = mul R R
state_after: S : Type u_1
T : Type u_2
R : Type u_3
M : Type u_4
N : Type u_5
inst✝⁵ : CommSemiring S
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Algebra S R
inst✝¹ : Module R M
inst✝ : Invertible 2
⊢ (mul R R).compl₁₂ LinearMap.id LinearMap.id = mul R R

tactic: rfl
state_before: S : Type u_1
T : Type u_2
R : Type u_3
M : Type u_4
N : Type u_5
inst✝⁵ : CommSemiring S
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Algebra S R
inst✝¹ : Module R M
inst✝ : Invertible 2
⊢ (mul R R).compl₁₂ LinearMap.id LinearMap.id = mul R R
state_after: no goals
Theorem: op_geom_sum₂
File: Mathlib/Algebra/GeomSum.lean

tactic: rw [← sum_range_reflect]
state_before: α : Type u
inst✝ : Semiring α
x y : α
n : ℕ
⊢ ∑ i ∈ range n, op y ^ (n - 1 - i) * op x ^ i = ∑ i ∈ range n, op y ^ i * op x ^ (n - 1 - i)
state_after: α : Type u
inst✝ : Semiring α
x y : α
n : ℕ
⊢ ∑ j ∈ range n, op y ^ (n - 1 - (n - 1 - j)) * op x ^ (n - 1 - j) = ∑ i ∈ range n, op y ^ i * op x ^ (n - 1 - i)

tactic: refine sum_congr rfl fun j j_in => ?_
state_before: α : Type u
inst✝ : Semiring α
x y : α
n : ℕ
⊢ ∑ j ∈ range n, op y ^ (n - 1 - (n - 1 - j)) * op x ^ (n - 1 - j) = ∑ i ∈ range n, op y ^ i * op x ^ (n - 1 - i)
state_after: α : Type u
inst✝ : Semiring α
x y : α
n j : ℕ
j_in : j ∈ range n
⊢ op y ^ (n - 1 - (n - 1 - j)) * op x ^ (n - 1 - j) = op y ^ j * op x ^ (n - 1 - j)

tactic: rw [mem_range, Nat.lt_iff_add_one_le] at j_in
state_before: α : Type u
inst✝ : Semiring α
x y : α
n j : ℕ
j_in : j ∈ range n
⊢ op y ^ (n - 1 - (n - 1 - j)) * op x ^ (n - 1 - j) = op y ^ j * op x ^ (n - 1 - j)
state_after: α : Type u
inst✝ : Semiring α
x y : α
n j : ℕ
j_in : j + 1 ≤ n
⊢ op y ^ (n - 1 - (n - 1 - j)) * op x ^ (n - 1 - j) = op y ^ j * op x ^ (n - 1 - j)

tactic: congr
state_before: α : Type u
inst✝ : Semiring α
x y : α
n j : ℕ
j_in : j + 1 ≤ n
⊢ op y ^ (n - 1 - (n - 1 - j)) * op x ^ (n - 1 - j) = op y ^ j * op x ^ (n - 1 - j)
state_after: case e_a.e_a
α : Type u
inst✝ : Semiring α
x y : α
n j : ℕ
j_in : j + 1 ≤ n
⊢ n - 1 - (n - 1 - j) = j

tactic: apply tsub_tsub_cancel_of_le
state_before: case e_a.e_a
α : Type u
inst✝ : Semiring α
x y : α
n j : ℕ
j_in : j + 1 ≤ n
⊢ n - 1 - (n - 1 - j) = j
state_after: case e_a.e_a.h
α : Type u
inst✝ : Semiring α
x y : α
n j : ℕ
j_in : j + 1 ≤ n
⊢ j ≤ n - 1

tactic: exact le_tsub_of_add_le_right j_in
state_before: case e_a.e_a.h
α : Type u
inst✝ : Semiring α
x y : α
n j : ℕ
j_in : j + 1 ≤ n
⊢ j ≤ n - 1
state_after: no goals
Theorem: FdRep.char_linHom
File: Mathlib/RepresentationTheory/Character.lean

tactic: rw [← char_iso (dualTensorIsoLinHom _ _), char_tensor, Pi.mul_apply, char_dual]
state_before: k : Type u
inst✝¹ : Field k
G : Type u
inst✝ : Group G
V W : FdRep k G
g : G
⊢ (of (linHom V.ρ W.ρ)).character g = V.character g⁻¹ * W.character g
state_after: no goals
Theorem: Cardinal.aleph'_omega
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: simp only [aleph'_le_of_limit omega_isLimit, lt_omega, exists_imp, aleph0_le]
state_before: c : Cardinal.{u_1}
⊢ aleph' ω ≤ c ↔ ℵ₀ ≤ c
state_after: c : Cardinal.{u_1}
⊢ (∀ (o' : Ordinal.{u_1}) (x : ℕ), o' = ↑x → aleph' o' ≤ c) ↔ ∀ (n : ℕ), ↑n ≤ c

tactic: exact forall_swap.trans (forall_congr' fun n => by simp only [forall_eq, aleph'_nat])
state_before: c : Cardinal.{u_1}
⊢ (∀ (o' : Ordinal.{u_1}) (x : ℕ), o' = ↑x → aleph' o' ≤ c) ↔ ∀ (n : ℕ), ↑n ≤ c
state_after: no goals

tactic: simp only [forall_eq, aleph'_nat]
state_before: c : Cardinal.{u_1}
n : ℕ
⊢ (∀ (x : Ordinal.{u_1}), x = ↑n → aleph' x ≤ c) ↔ ↑n ≤ c
state_after: no goals
Theorem: mul_inv_le_one_of_le
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: simpa only [← div_eq_mul_inv] using div_le_one_of_le h hb
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
h : a ≤ b
hb : 0 ≤ b
⊢ a * b⁻¹ ≤ 1
state_after: no goals
Theorem: MeasureTheory.snorm_smul_measure_of_ne_top
File: Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean

tactic: by_cases hp0 : p = 0
state_before: α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p✝ : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
p : ℝ≥0∞
hp_ne_top : p ≠ ⊤
f : α → F
c : ℝ≥0∞
⊢ snorm f p (c • μ) = c ^ (1 / p).toReal • snorm f p μ
state_after: case pos
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p✝ : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
p : ℝ≥0∞
hp_ne_top : p ≠ ⊤
f : α → F
c : ℝ≥0∞
hp0 : p = 0
⊢ snorm f p (c • μ) = c ^ (1 / p).toReal • snorm f p μ

case neg
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p✝ : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
p : ℝ≥0∞
hp_ne_top : p ≠ ⊤
f : α → F
c : ℝ≥0∞
hp0 : ¬p = 0
⊢ snorm f p (c • μ) = c ^ (1 / p).toReal • snorm f p μ

tactic: simp [hp0]
state_before: case pos
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p✝ : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
p : ℝ≥0∞
hp_ne_top : p ≠ ⊤
f : α → F
c : ℝ≥0∞
hp0 : p = 0
⊢ snorm f p (c • μ) = c ^ (1 / p).toReal • snorm f p μ
state_after: no goals

tactic: exact snorm_smul_measure_of_ne_zero_of_ne_top hp0 hp_ne_top c
state_before: case neg
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p✝ : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
p : ℝ≥0∞
hp_ne_top : p ≠ ⊤
f : α → F
c : ℝ≥0∞
hp0 : ¬p = 0
⊢ snorm f p (c • μ) = c ^ (1 / p).toReal • snorm f p μ
state_after: no goals
Theorem: MeasurableSet.ite'
File: Mathlib/MeasureTheory/MeasurableSpace/Defs.lean

tactic: split_ifs with h
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort u_6
s✝ t✝ u : Set α
m : MeasurableSpace α
s t : Set α
p : Prop
hs : p → MeasurableSet s
ht : ¬p → MeasurableSet t
⊢ MeasurableSet (if p then s else t)
state_after: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort u_6
s✝ t✝ u : Set α
m : MeasurableSpace α
s t : Set α
p : Prop
hs : p → MeasurableSet s
ht : ¬p → MeasurableSet t
h : p
⊢ MeasurableSet s

case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort u_6
s✝ t✝ u : Set α
m : MeasurableSpace α
s t : Set α
p : Prop
hs : p → MeasurableSet s
ht : ¬p → MeasurableSet t
h : ¬p
⊢ MeasurableSet t

tactic: exacts [hs h, ht h]
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort u_6
s✝ t✝ u : Set α
m : MeasurableSpace α
s t : Set α
p : Prop
hs : p → MeasurableSet s
ht : ¬p → MeasurableSet t
h : p
⊢ MeasurableSet s

case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort u_6
s✝ t✝ u : Set α
m : MeasurableSpace α
s t : Set α
p : Prop
hs : p → MeasurableSet s
ht : ¬p → MeasurableSet t
h : ¬p
⊢ MeasurableSet t
state_after: no goals
Theorem: Fin.card_filter_univ_succ
File: Mathlib/Data/Fintype/Fin.lean

tactic: split_ifs <;> simp [add_comm 1]
state_before: α : Type u_1
β : Type u_2
n : ℕ
p : Fin (n + 1) → Prop
inst✝ : DecidablePred p
⊢ (if p 0 then 1 else 0) + (filter (p ∘ succ) univ).card =
    if p 0 then (filter (p ∘ succ) univ).card + 1 else (filter (p ∘ succ) univ).card
state_after: no goals
Theorem: Polynomial.isFixedPt_newtonMap_of_aeval_eq_zero
File: Mathlib/Dynamics/Newton.lean

tactic: rw [IsFixedPt, newtonMap_apply, h, mul_zero, sub_zero]
state_before: R : Type u_1
S : Type u_2
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Algebra R S
P : R[X]
x : S
h : (aeval x) P = 0
⊢ IsFixedPt P.newtonMap x
state_after: no goals
Theorem: Setoid.sSup_eq_eqvGen
File: Mathlib/Data/Setoid/Basic.lean

tactic: rw [eqvGen_eq]
state_before: α : Type u_1
β : Type u_2
S : Set (Setoid α)
⊢ sSup S = EqvGen.Setoid fun x y => ∃ r ∈ S, r.Rel x y
state_after: α : Type u_1
β : Type u_2
S : Set (Setoid α)
⊢ sSup S = sInf {s | ∀ ⦃x y : α⦄, (∃ r ∈ S, r.Rel x y) → s.Rel x y}

tactic: apply congr_arg sInf
state_before: α : Type u_1
β : Type u_2
S : Set (Setoid α)
⊢ sSup S = sInf {s | ∀ ⦃x y : α⦄, (∃ r ∈ S, r.Rel x y) → s.Rel x y}
state_after: α : Type u_1
β : Type u_2
S : Set (Setoid α)
⊢ upperBounds S = {s | ∀ ⦃x y : α⦄, (∃ r ∈ S, r.Rel x y) → s.Rel x y}

tactic: simp only [upperBounds, le_def, and_imp, exists_imp]
state_before: α : Type u_1
β : Type u_2
S : Set (Setoid α)
⊢ upperBounds S = {s | ∀ ⦃x y : α⦄, (∃ r ∈ S, r.Rel x y) → s.Rel x y}
state_after: α : Type u_1
β : Type u_2
S : Set (Setoid α)
⊢ {x | ∀ ⦃a : Setoid α⦄, a ∈ S → ∀ {x_1 y : α}, a.Rel x_1 y → x.Rel x_1 y} =
    {s | ∀ ⦃x y : α⦄, ∀ x_1 ∈ S, x_1.Rel x y → s.Rel x y}

tactic: ext
state_before: α : Type u_1
β : Type u_2
S : Set (Setoid α)
⊢ {x | ∀ ⦃a : Setoid α⦄, a ∈ S → ∀ {x_1 y : α}, a.Rel x_1 y → x.Rel x_1 y} =
    {s | ∀ ⦃x y : α⦄, ∀ x_1 ∈ S, x_1.Rel x y → s.Rel x y}
state_after: case h
α : Type u_1
β : Type u_2
S : Set (Setoid α)
x✝ : Setoid α
⊢ x✝ ∈ {x | ∀ ⦃a : Setoid α⦄, a ∈ S → ∀ {x_1 y : α}, a.Rel x_1 y → x.Rel x_1 y} ↔
    x✝ ∈ {s | ∀ ⦃x y : α⦄, ∀ x_1 ∈ S, x_1.Rel x y → s.Rel x y}

tactic: exact ⟨fun H x y r hr => H hr, fun H r hr x y => H r hr⟩
state_before: case h
α : Type u_1
β : Type u_2
S : Set (Setoid α)
x✝ : Setoid α
⊢ x✝ ∈ {x | ∀ ⦃a : Setoid α⦄, a ∈ S → ∀ {x_1 y : α}, a.Rel x_1 y → x.Rel x_1 y} ↔
    x✝ ∈ {s | ∀ ⦃x y : α⦄, ∀ x_1 ∈ S, x_1.Rel x y → s.Rel x y}
state_after: no goals
Theorem: List.range'_append_1
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

tactic: simpa using range'_append s m n 1
state_before: s m n : Nat
⊢ range' s m ++ range' (s + m) n = range' s (n + m)
state_after: no goals