1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Matrix.smul_mulVec_assoc
File: Mathlib/Data/Matrix/Basic.lean

tactic: ext
state_before: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
inst✝⁴ : NonUnitalNonAssocSemiring α
inst✝³ : Fintype n
inst✝² : Monoid R
inst✝¹ : DistribMulAction R α
inst✝ : IsScalarTower R α α
a : R
A : Matrix m n α
b : n → α
⊢ (a • A) *ᵥ b = a • A *ᵥ b
state_after: case h
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
inst✝⁴ : NonUnitalNonAssocSemiring α
inst✝³ : Fintype n
inst✝² : Monoid R
inst✝¹ : DistribMulAction R α
inst✝ : IsScalarTower R α α
a : R
A : Matrix m n α
b : n → α
x✝ : m
⊢ ((a • A) *ᵥ b) x✝ = (a • A *ᵥ b) x✝

tactic: apply smul_dotProduct
state_before: case h
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
inst✝⁴ : NonUnitalNonAssocSemiring α
inst✝³ : Fintype n
inst✝² : Monoid R
inst✝¹ : DistribMulAction R α
inst✝ : IsScalarTower R α α
a : R
A : Matrix m n α
b : n → α
x✝ : m
⊢ ((a • A) *ᵥ b) x✝ = (a • A *ᵥ b) x✝
state_after: no goals
Theorem: PrimeSpectrum.basicOpen_mul_le_left
File: Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean

tactic: rw [basicOpen_mul f g]
state_before: R : Type u
S : Type v
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
f g : R
⊢ basicOpen (f * g) ≤ basicOpen f
state_after: R : Type u
S : Type v
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
f g : R
⊢ basicOpen f ⊓ basicOpen g ≤ basicOpen f

tactic: exact inf_le_left
state_before: R : Type u
S : Type v
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
f g : R
⊢ basicOpen f ⊓ basicOpen g ≤ basicOpen f
state_after: no goals
Theorem: AbstractCompletion.extend_unique
File: Mathlib/Topology/UniformSpace/AbstractCompletion.lean

tactic: apply pkg.funext pkg.continuous_extend hg.continuous
state_before: α : Type u_1
inst✝³ : UniformSpace α
pkg : AbstractCompletion α
β : Type u_2
inst✝² : UniformSpace β
f : α → β
inst✝¹ : CompleteSpace β
inst✝ : T0Space β
hf : UniformContinuous f
g : pkg.space → β
hg : UniformContinuous g
h : ∀ (a : α), f a = g (pkg.coe a)
⊢ pkg.extend f = g
state_after: α : Type u_1
inst✝³ : UniformSpace α
pkg : AbstractCompletion α
β : Type u_2
inst✝² : UniformSpace β
f : α → β
inst✝¹ : CompleteSpace β
inst✝ : T0Space β
hf : UniformContinuous f
g : pkg.space → β
hg : UniformContinuous g
h : ∀ (a : α), f a = g (pkg.coe a)
⊢ ∀ (a : α), pkg.extend f (pkg.coe a) = g (pkg.coe a)

tactic: simpa only [pkg.extend_coe hf] using h
state_before: α : Type u_1
inst✝³ : UniformSpace α
pkg : AbstractCompletion α
β : Type u_2
inst✝² : UniformSpace β
f : α → β
inst✝¹ : CompleteSpace β
inst✝ : T0Space β
hf : UniformContinuous f
g : pkg.space → β
hg : UniformContinuous g
h : ∀ (a : α), f a = g (pkg.coe a)
⊢ ∀ (a : α), pkg.extend f (pkg.coe a) = g (pkg.coe a)
state_after: no goals
Theorem: Polynomial.Monic.degree_mul
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

tactic: simp [hp]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
hq : q.Monic
this : DecidableEq R := Classical.decEq R
hp : p = 0
⊢ (p * q).degree = p.degree + q.degree
state_after: no goals

tactic: rwa [hq.leadingCoeff, mul_one, Ne, leadingCoeff_eq_zero]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
hq : q.Monic
this : DecidableEq R := Classical.decEq R
hp : ¬p = 0
⊢ p.leadingCoeff * q.leadingCoeff ≠ 0
state_after: no goals
Theorem: Polynomial.count_map_roots_of_injective
File: Mathlib/Algebra/Polynomial/Roots.lean

tactic: by_cases hp0 : p = 0
state_before: R : Type u
S : Type v
T : Type w
a b✝ : R
n : ℕ
A : Type u_1
B : Type u_2
inst✝³ : CommRing A
inst✝² : CommRing B
inst✝¹ : IsDomain A
inst✝ : DecidableEq B
p : A[X]
f : A →+* B
hf : Function.Injective ⇑f
b : B
⊢ Multiset.count b (Multiset.map (⇑f) p.roots) ≤ rootMultiplicity b (map f p)
state_after: case pos
R : Type u
S : Type v
T : Type w
a b✝ : R
n : ℕ
A : Type u_1
B : Type u_2
inst✝³ : CommRing A
inst✝² : CommRing B
inst✝¹ : IsDomain A
inst✝ : DecidableEq B
p : A[X]
f : A →+* B
hf : Function.Injective ⇑f
b : B
hp0 : p = 0
⊢ Multiset.count b (Multiset.map (⇑f) p.roots) ≤ rootMultiplicity b (map f p)

case neg
R : Type u
S : Type v
T : Type w
a b✝ : R
n : ℕ
A : Type u_1
B : Type u_2
inst✝³ : CommRing A
inst✝² : CommRing B
inst✝¹ : IsDomain A
inst✝ : DecidableEq B
p : A[X]
f : A →+* B
hf : Function.Injective ⇑f
b : B
hp0 : ¬p = 0
⊢ Multiset.count b (Multiset.map (⇑f) p.roots) ≤ rootMultiplicity b (map f p)

tactic: simp only [hp0, roots_zero, Multiset.map_zero, Multiset.count_zero, Polynomial.map_zero,
  rootMultiplicity_zero, le_refl]
state_before: case pos
R : Type u
S : Type v
T : Type w
a b✝ : R
n : ℕ
A : Type u_1
B : Type u_2
inst✝³ : CommRing A
inst✝² : CommRing B
inst✝¹ : IsDomain A
inst✝ : DecidableEq B
p : A[X]
f : A →+* B
hf : Function.Injective ⇑f
b : B
hp0 : p = 0
⊢ Multiset.count b (Multiset.map (⇑f) p.roots) ≤ rootMultiplicity b (map f p)
state_after: no goals

tactic: exact count_map_roots ((Polynomial.map_ne_zero_iff hf).mpr hp0) b
state_before: case neg
R : Type u
S : Type v
T : Type w
a b✝ : R
n : ℕ
A : Type u_1
B : Type u_2
inst✝³ : CommRing A
inst✝² : CommRing B
inst✝¹ : IsDomain A
inst✝ : DecidableEq B
p : A[X]
f : A →+* B
hf : Function.Injective ⇑f
b : B
hp0 : ¬p = 0
⊢ Multiset.count b (Multiset.map (⇑f) p.roots) ≤ rootMultiplicity b (map f p)
state_after: no goals
Theorem: MeasureTheory.trim_add
File: Mathlib/MeasureTheory/Measure/Trim.lean

tactic: simp [trim_measurableSet_eq hm hs]
state_before: α : Type u_1
m m0 : MeasurableSpace α
μ : Measure α
s✝ : Set α
ν : Measure α
hm : m ≤ m0
s : Set α
hs : MeasurableSet s
⊢ ((μ + ν).trim hm) s = (μ.trim hm + ν.trim hm) s
state_after: no goals
Theorem: isClosed_of_closure_subset
File: Mathlib/Topology/Basic.lean

tactic: rw [subset_closure.antisymm h]
state_before: X : Type u
Y : Type v
ι : Sort w
α : Type u_1
β : Type u_2
x : X
s s₁ s₂ t : Set X
p p₁ p₂ : X → Prop
inst✝ : TopologicalSpace X
h : closure s ⊆ s
⊢ IsClosed s
state_after: X : Type u
Y : Type v
ι : Sort w
α : Type u_1
β : Type u_2
x : X
s s₁ s₂ t : Set X
p p₁ p₂ : X → Prop
inst✝ : TopologicalSpace X
h : closure s ⊆ s
⊢ IsClosed (closure s)

tactic: exact isClosed_closure
state_before: X : Type u
Y : Type v
ι : Sort w
α : Type u_1
β : Type u_2
x : X
s s₁ s₂ t : Set X
p p₁ p₂ : X → Prop
inst✝ : TopologicalSpace X
h : closure s ⊆ s
⊢ IsClosed (closure s)
state_after: no goals
Theorem: List.mem_inter_of_mem_of_mem
File: Mathlib/Data/List/Lattice.lean

tactic: simpa using h₂
state_before: α : Type u_1
l l₁ l₂ : List α
p : α → Prop
a : α
inst✝ : DecidableEq α
h₁ : a ∈ l₁
h₂ : a ∈ l₂
⊢ elem a l₂ = true
state_after: no goals
Theorem: dite_prop_iff_and
File: Mathlib/Logic/Basic.lean

tactic: by_cases h : P <;> simp [h, forall_prop_of_false, forall_prop_of_true]
state_before: α : Sort u_1
σ : α → Sort u_2
P Q✝ R✝ : Prop
inst✝² : Decidable P
inst✝¹ : Decidable Q✝
a b c : α
A : P → α
B : ¬P → α
Q : P → Prop
R : ¬P → Prop
inst✝ : Decidable P
⊢ dite P Q R ↔ (∀ (h : P), Q h) ∧ ∀ (h : ¬P), R h
state_after: no goals
Theorem: Set.inv_zero
File: Mathlib/Data/Set/Pointwise/SMul.lean

tactic: ext
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : GroupWithZero α
inst✝ : MulAction α β
s t : Set β
a : α
⊢ 0⁻¹ = 0
state_after: case h
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : GroupWithZero α
inst✝ : MulAction α β
s t : Set β
a x✝ : α
⊢ x✝ ∈ 0⁻¹ ↔ x✝ ∈ 0

tactic: simp
state_before: case h
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : GroupWithZero α
inst✝ : MulAction α β
s t : Set β
a x✝ : α
⊢ x✝ ∈ 0⁻¹ ↔ x✝ ∈ 0
state_after: no goals
Theorem: Set.IsPWO.isWF
File: Mathlib/Order/WellFoundedSet.lean

tactic: simpa only [← lt_iff_le_not_le] using h.wellFoundedOn
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
π : ι → Type u_5
inst✝¹ : Preorder α
inst✝ : Preorder β
s t : Set α
h : s.IsPWO
⊢ s.IsWF
state_after: no goals
Theorem: Finset.sumLexLift_nonempty
File: Mathlib/Data/Sum/Interval.lean

tactic: simp only [nonempty_iff_ne_empty, Ne, sumLexLift_eq_empty, not_and_or, exists_prop,
  not_forall]
state_before: α₁ : Type u_1
α₂ : Type u_2
β₁ : Type u_3
β₂ : Type u_4
γ₁ : Type u_5
γ₂ : Type u_6
f₁ f₁' : α₁ → β₁ → Finset γ₁
f₂ f₂' : α₂ → β₂ → Finset γ₂
g₁ g₁' : α₁ → β₂ → Finset γ₁
g₂ g₂' : α₁ → β₂ → Finset γ₂
a : α₁ ⊕ α₂
b : β₁ ⊕ β₂
c : γ₁ ⊕ γ₂
⊢ (sumLexLift f₁ f₂ g₁ g₂ a b).Nonempty ↔
    (∃ a₁ b₁, a = inl a₁ ∧ b = inl b₁ ∧ (f₁ a₁ b₁).Nonempty) ∨
      (∃ a₁ b₂, a = inl a₁ ∧ b = inr b₂ ∧ ((g₁ a₁ b₂).Nonempty ∨ (g₂ a₁ b₂).Nonempty)) ∨
        ∃ a₂ b₂, a = inr a₂ ∧ b = inr b₂ ∧ (f₂ a₂ b₂).Nonempty
state_after: no goals
Theorem: List.forIn_eq_bindList
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

tactic: induction l generalizing init <;> simp [*, map_eq_pure_bind]
state_before: m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
f : α → β → m (ForInStep β)
l : List α
init : β
⊢ forIn l init f = ForInStep.run <$> ForInStep.bindList f l (ForInStep.yield init)
state_after: case cons
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
f : α → β → m (ForInStep β)
head✝ : α
tail✝ : List α
tail_ih✝ : ∀ (init : β), forIn tail✝ init f = ForInStep.run <$> ForInStep.bindList f tail✝ (ForInStep.yield init)
init : β
⊢ (do
      let x ← f head✝ init
      match x with
        | ForInStep.done b => pure b
        | ForInStep.yield b => do
          let a ← ForInStep.bindList f tail✝ (ForInStep.yield b)
          pure a.run) =
    do
    let x ← f head✝ init
    let a ← ForInStep.bindList f tail✝ x
    pure a.run

tactic: congr
state_before: case cons
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
f : α → β → m (ForInStep β)
head✝ : α
tail✝ : List α
tail_ih✝ : ∀ (init : β), forIn tail✝ init f = ForInStep.run <$> ForInStep.bindList f tail✝ (ForInStep.yield init)
init : β
⊢ (do
      let x ← f head✝ init
      match x with
        | ForInStep.done b => pure b
        | ForInStep.yield b => do
          let a ← ForInStep.bindList f tail✝ (ForInStep.yield b)
          pure a.run) =
    do
    let x ← f head✝ init
    let a ← ForInStep.bindList f tail✝ x
    pure a.run
state_after: case cons.e_a
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
f : α → β → m (ForInStep β)
head✝ : α
tail✝ : List α
tail_ih✝ : ∀ (init : β), forIn tail✝ init f = ForInStep.run <$> ForInStep.bindList f tail✝ (ForInStep.yield init)
init : β
⊢ (fun x =>
      match x with
      | ForInStep.done b => pure b
      | ForInStep.yield b => do
        let a ← ForInStep.bindList f tail✝ (ForInStep.yield b)
        pure a.run) =
    fun x => do
    let a ← ForInStep.bindList f tail✝ x
    pure a.run

tactic: ext (b | b) <;> simp
state_before: case cons.e_a
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
f : α → β → m (ForInStep β)
head✝ : α
tail✝ : List α
tail_ih✝ : ∀ (init : β), forIn tail✝ init f = ForInStep.run <$> ForInStep.bindList f tail✝ (ForInStep.yield init)
init : β
⊢ (fun x =>
      match x with
      | ForInStep.done b => pure b
      | ForInStep.yield b => do
        let a ← ForInStep.bindList f tail✝ (ForInStep.yield b)
        pure a.run) =
    fun x => do
    let a ← ForInStep.bindList f tail✝ x
    pure a.run
state_after: no goals
Theorem: Subsemigroup.coe_iSup_of_directed
File: Mathlib/Algebra/Group/Subsemigroup/Membership.lean

tactic: simp [mem_iSup_of_directed hS]
state_before: ι : Sort u_1
M : Type u_2
A : Type u_3
B : Type u_4
inst✝ : Mul M
S : ι → Subsemigroup M
hS : Directed (fun x x_1 => x ≤ x_1) S
x : M
⊢ x ∈ ↑(⨆ i, S i) ↔ x ∈ ⋃ i, ↑(S i)
state_after: no goals
Theorem: CategoryTheory.Limits.equalizerSubobject_factors_iff
File: Mathlib/CategoryTheory/Subobject/Limits.lean

tactic: rw [← Subobject.factorThru_arrow _ _ w, Category.assoc, equalizerSubobject_arrow_comp,
  Category.assoc]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : C
f g : X ⟶ Y
inst✝ : HasEqualizer f g
W : C
h : W ⟶ X
w : (equalizerSubobject f g).Factors h
⊢ h ≫ f = h ≫ g
state_after: no goals
Theorem: Nat.choose_succ_right_eq
File: Mathlib/Data/Nat/Choose/Basic.lean

tactic: have e : (n + 1) * choose n k = choose n (k + 1) * (k + 1) + choose n k * (k + 1) := by
  rw [← Nat.add_mul, Nat.add_comm (choose _ _), ← choose_succ_succ, succ_mul_choose_eq]
state_before: n k : ℕ
⊢ n.choose (k + 1) * (k + 1) = n.choose k * (n - k)
state_after: n k : ℕ
e : (n + 1) * n.choose k = n.choose (k + 1) * (k + 1) + n.choose k * (k + 1)
⊢ n.choose (k + 1) * (k + 1) = n.choose k * (n - k)

tactic: rw [← Nat.sub_eq_of_eq_add e, Nat.mul_comm, ← Nat.mul_sub_left_distrib, Nat.add_sub_add_right]
state_before: n k : ℕ
e : (n + 1) * n.choose k = n.choose (k + 1) * (k + 1) + n.choose k * (k + 1)
⊢ n.choose (k + 1) * (k + 1) = n.choose k * (n - k)
state_after: no goals

tactic: rw [← Nat.add_mul, Nat.add_comm (choose _ _), ← choose_succ_succ, succ_mul_choose_eq]
state_before: n k : ℕ
⊢ (n + 1) * n.choose k = n.choose (k + 1) * (k + 1) + n.choose k * (k + 1)
state_after: no goals
Theorem: Zsqrtd.sqLe_mul
File: Mathlib/NumberTheory/Zsqrtd/Basic.lean

tactic: intro xy zw
state_before: case refine_4
d✝ : ℤ
d x y z w : ℕ
⊢ SqLe y d x 1 → SqLe w d z 1 → SqLe (x * w + y * z) d (x * z + d * y * w) 1
state_after: case refine_4
d✝ : ℤ
d x y z w : ℕ
xy : SqLe y d x 1
zw : SqLe w d z 1
⊢ SqLe (x * w + y * z) d (x * z + d * y * w) 1

tactic: have :=
  Int.mul_nonneg (sub_nonneg_of_le (Int.ofNat_le_ofNat_of_le xy))
    (sub_nonneg_of_le (Int.ofNat_le_ofNat_of_le zw))
state_before: case refine_4
d✝ : ℤ
d x y z w : ℕ
xy : SqLe y d x 1
zw : SqLe w d z 1
⊢ SqLe (x * w + y * z) d (x * z + d * y * w) 1
state_after: case refine_4
d✝ : ℤ
d x y z w : ℕ
xy : SqLe y d x 1
zw : SqLe w d z 1
this : 0 ≤ (↑(1 * x * x) - ↑(d * y * y)) * (↑(1 * z * z) - ↑(d * w * w))
⊢ SqLe (x * w + y * z) d (x * z + d * y * w) 1

tactic: refine Int.le_of_ofNat_le_ofNat (le_of_sub_nonneg ?_)
state_before: case refine_4
d✝ : ℤ
d x y z w : ℕ
xy : SqLe y d x 1
zw : SqLe w d z 1
this : 0 ≤ (↑(1 * x * x) - ↑(d * y * y)) * (↑(1 * z * z) - ↑(d * w * w))
⊢ SqLe (x * w + y * z) d (x * z + d * y * w) 1
state_after: case refine_4
d✝ : ℤ
d x y z w : ℕ
xy : SqLe y d x 1
zw : SqLe w d z 1
this : 0 ≤ (↑(1 * x * x) - ↑(d * y * y)) * (↑(1 * z * z) - ↑(d * w * w))
⊢ 0 ≤ ↑(1 * (x * z + d * y * w) * (x * z + d * y * w)) - ↑(d * (x * w + y * z) * (x * w + y * z))

tactic: convert this using 1
state_before: case refine_4
d✝ : ℤ
d x y z w : ℕ
xy : SqLe y d x 1
zw : SqLe w d z 1
this : 0 ≤ (↑(1 * x * x) - ↑(d * y * y)) * (↑(1 * z * z) - ↑(d * w * w))
⊢ 0 ≤ ↑(1 * (x * z + d * y * w) * (x * z + d * y * w)) - ↑(d * (x * w + y * z) * (x * w + y * z))
state_after: case h.e'_4
d✝ : ℤ
d x y z w : ℕ
xy : SqLe y d x 1
zw : SqLe w d z 1
this : 0 ≤ (↑(1 * x * x) - ↑(d * y * y)) * (↑(1 * z * z) - ↑(d * w * w))
⊢ ↑(1 * (x * z + d * y * w) * (x * z + d * y * w)) - ↑(d * (x * w + y * z) * (x * w + y * z)) =
    (↑(1 * x * x) - ↑(d * y * y)) * (↑(1 * z * z) - ↑(d * w * w))

tactic: simp only [one_mul, Int.ofNat_add, Int.ofNat_mul]
state_before: case h.e'_4
d✝ : ℤ
d x y z w : ℕ
xy : SqLe y d x 1
zw : SqLe w d z 1
this : 0 ≤ (↑(1 * x * x) - ↑(d * y * y)) * (↑(1 * z * z) - ↑(d * w * w))
⊢ ↑(1 * (x * z + d * y * w) * (x * z + d * y * w)) - ↑(d * (x * w + y * z) * (x * w + y * z)) =
    (↑(1 * x * x) - ↑(d * y * y)) * (↑(1 * z * z) - ↑(d * w * w))
state_after: case h.e'_4
d✝ : ℤ
d x y z w : ℕ
xy : SqLe y d x 1
zw : SqLe w d z 1
this : 0 ≤ (↑(1 * x * x) - ↑(d * y * y)) * (↑(1 * z * z) - ↑(d * w * w))
⊢ (↑x * ↑z + ↑d * ↑y * ↑w) * (↑x * ↑z + ↑d * ↑y * ↑w) - ↑d * (↑x * ↑w + ↑y * ↑z) * (↑x * ↑w + ↑y * ↑z) =
    (↑x * ↑x - ↑d * ↑y * ↑y) * (↑z * ↑z - ↑d * ↑w * ↑w)

tactic: ring
state_before: case h.e'_4
d✝ : ℤ
d x y z w : ℕ
xy : SqLe y d x 1
zw : SqLe w d z 1
this : 0 ≤ (↑(1 * x * x) - ↑(d * y * y)) * (↑(1 * z * z) - ↑(d * w * w))
⊢ (↑x * ↑z + ↑d * ↑y * ↑w) * (↑x * ↑z + ↑d * ↑y * ↑w) - ↑d * (↑x * ↑w + ↑y * ↑z) * (↑x * ↑w + ↑y * ↑z) =
    (↑x * ↑x - ↑d * ↑y * ↑y) * (↑z * ↑z - ↑d * ↑w * ↑w)
state_after: no goals
Theorem: catalan_one
File: Mathlib/Combinatorics/Enumerative/Catalan.lean

tactic: simp [catalan_succ]
state_before: ⊢ catalan 1 = 1
state_after: no goals
Theorem: Composition.sizeUpTo_le
File: Mathlib/Combinatorics/Enumerative/Composition.lean

tactic: conv_rhs => rw [← c.blocks_sum, ← sum_take_add_sum_drop _ i]
state_before: n : ℕ
c : Composition n
i : ℕ
⊢ c.sizeUpTo i ≤ n
state_after: n : ℕ
c : Composition n
i : ℕ
⊢ c.sizeUpTo i ≤ (take i c.blocks).sum + (drop i c.blocks).sum

tactic: exact Nat.le_add_right _ _
state_before: n : ℕ
c : Composition n
i : ℕ
⊢ c.sizeUpTo i ≤ (take i c.blocks).sum + (drop i c.blocks).sum
state_after: no goals
Theorem: Rat.cast_sub_of_ne_zero
File: Mathlib/Data/Rat/Cast/Defs.lean

tactic: simp [sub_eq_add_neg, cast_add_of_ne_zero, hp, hq]
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
inst✝ : DivisionRing α
p q : ℚ
hp : ↑p.den ≠ 0
hq : ↑q.den ≠ 0
⊢ ↑(p - q) = ↑p - ↑q
state_after: no goals
Theorem: FreeRing.coe_neg
File: Mathlib/RingTheory/FreeCommRing.lean

tactic: rw [castFreeCommRing, map_neg]
state_before: α : Type u
x : FreeRing α
⊢ ↑(-x) = -↑x
state_after: no goals
Theorem: Set.univ_prod_univ
File: Mathlib/Data/Set/Prod.lean

tactic: ext
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
⊢ univ ×ˢ univ = univ
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
x✝ : α × β
⊢ x✝ ∈ univ ×ˢ univ ↔ x✝ ∈ univ

tactic: exact true_and_iff _
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
x✝ : α × β
⊢ x✝ ∈ univ ×ˢ univ ↔ x✝ ∈ univ
state_after: no goals
Theorem: dirSupClosed_iff_forall_sSup
File: Mathlib/Topology/Order/ScottTopology.lean

tactic: simp [DirSupClosed, isLUB_iff_sSup_eq]
state_before: α : Type u_1
β : Type u_2
inst✝ : CompleteLattice α
s t : Set α
⊢ DirSupClosed s ↔ ∀ ⦃d : Set α⦄, d.Nonempty → DirectedOn (fun x x_1 => x ≤ x_1) d → d ⊆ s → sSup d ∈ s
state_after: no goals
Theorem: Filter.generate_eq_biInf
File: Mathlib/Order/Filter/Basic.lean

tactic: simp [le_generate_iff, le_principal_iff, subset_def]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s t : Set α
S : Set (Set α)
f : Filter α
⊢ f ≤ generate S ↔ f ≤ ⨅ s ∈ S, 𝓟 s
state_after: no goals
Theorem: Finsupp.cons_ne_zero_of_left
File: Mathlib/Data/Finsupp/Fin.lean

tactic: contrapose! h with c
state_before: n : ℕ
i : Fin n
M : Type u_1
inst✝ : Zero M
y : M
t : Fin (n + 1) →₀ M
s : Fin n →₀ M
h : y ≠ 0
⊢ cons y s ≠ 0
state_after: n : ℕ
i : Fin n
M : Type u_1
inst✝ : Zero M
y : M
t : Fin (n + 1) →₀ M
s : Fin n →₀ M
c : cons y s = 0
⊢ y = 0

tactic: rw [← cons_zero y s, c, Finsupp.coe_zero, Pi.zero_apply]
state_before: n : ℕ
i : Fin n
M : Type u_1
inst✝ : Zero M
y : M
t : Fin (n + 1) →₀ M
s : Fin n →₀ M
c : cons y s = 0
⊢ y = 0
state_after: no goals
Theorem: Set.Sized.card_le
File: Mathlib/Data/Finset/Slice.lean

tactic: rw [Fintype.card, ← card_powersetCard]
state_before: α : Type u_1
ι : Sort u_2
κ : ι → Sort u_3
inst✝ : Fintype α
𝒜 : Finset (Finset α)
s : Finset α
r : ℕ
h𝒜 : Set.Sized r ↑𝒜
⊢ 𝒜.card ≤ (Fintype.card α).choose r
state_after: α : Type u_1
ι : Sort u_2
κ : ι → Sort u_3
inst✝ : Fintype α
𝒜 : Finset (Finset α)
s : Finset α
r : ℕ
h𝒜 : Set.Sized r ↑𝒜
⊢ 𝒜.card ≤ (powersetCard r univ).card

tactic: exact card_le_card (subset_powersetCard_univ_iff.mpr h𝒜)
state_before: α : Type u_1
ι : Sort u_2
κ : ι → Sort u_3
inst✝ : Fintype α
𝒜 : Finset (Finset α)
s : Finset α
r : ℕ
h𝒜 : Set.Sized r ↑𝒜
⊢ 𝒜.card ≤ (powersetCard r univ).card
state_after: no goals
Theorem: CategoryTheory.Limits.colimit.map_post
File: Mathlib/CategoryTheory/Limits/HasLimits.lean

tactic: ext
state_before: J : Type u₁
inst✝⁵ : Category.{v₁, u₁} J
K : Type u₂
inst✝⁴ : Category.{v₂, u₂} K
C : Type u
inst✝³ : Category.{v, u} C
F : J ⥤ C
inst✝² : HasColimitsOfShape J C
G : J ⥤ C
α : F ⟶ G
D : Type u'
inst✝¹ : Category.{v', u'} D
inst✝ : HasColimitsOfShape J D
H : C ⥤ D
⊢ post F H ≫ H.map (colim.map α) = colim.map (whiskerRight α H) ≫ post G H
state_after: case w
J : Type u₁
inst✝⁵ : Category.{v₁, u₁} J
K : Type u₂
inst✝⁴ : Category.{v₂, u₂} K
C : Type u
inst✝³ : Category.{v, u} C
F : J ⥤ C
inst✝² : HasColimitsOfShape J C
G : J ⥤ C
α : F ⟶ G
D : Type u'
inst✝¹ : Category.{v', u'} D
inst✝ : HasColimitsOfShape J D
H : C ⥤ D
j✝ : J
⊢ ι (F ⋙ H) j✝ ≫ post F H ≫ H.map (colim.map α) = ι (F ⋙ H) j✝ ≫ colim.map (whiskerRight α H) ≫ post G H

tactic: rw [← assoc, colimit.ι_post, ← H.map_comp, colimit.ι_map, H.map_comp]
state_before: case w
J : Type u₁
inst✝⁵ : Category.{v₁, u₁} J
K : Type u₂
inst✝⁴ : Category.{v₂, u₂} K
C : Type u
inst✝³ : Category.{v, u} C
F : J ⥤ C
inst✝² : HasColimitsOfShape J C
G : J ⥤ C
α : F ⟶ G
D : Type u'
inst✝¹ : Category.{v', u'} D
inst✝ : HasColimitsOfShape J D
H : C ⥤ D
j✝ : J
⊢ ι (F ⋙ H) j✝ ≫ post F H ≫ H.map (colim.map α) = ι (F ⋙ H) j✝ ≫ colim.map (whiskerRight α H) ≫ post G H
state_after: case w
J : Type u₁
inst✝⁵ : Category.{v₁, u₁} J
K : Type u₂
inst✝⁴ : Category.{v₂, u₂} K
C : Type u
inst✝³ : Category.{v, u} C
F : J ⥤ C
inst✝² : HasColimitsOfShape J C
G : J ⥤ C
α : F ⟶ G
D : Type u'
inst✝¹ : Category.{v', u'} D
inst✝ : HasColimitsOfShape J D
H : C ⥤ D
j✝ : J
⊢ H.map (α.app j✝) ≫ H.map (ι G j✝) = ι (F ⋙ H) j✝ ≫ colim.map (whiskerRight α H) ≫ post G H

tactic: rw [← assoc, colimit.ι_map, assoc, colimit.ι_post]
state_before: case w
J : Type u₁
inst✝⁵ : Category.{v₁, u₁} J
K : Type u₂
inst✝⁴ : Category.{v₂, u₂} K
C : Type u
inst✝³ : Category.{v, u} C
F : J ⥤ C
inst✝² : HasColimitsOfShape J C
G : J ⥤ C
α : F ⟶ G
D : Type u'
inst✝¹ : Category.{v', u'} D
inst✝ : HasColimitsOfShape J D
H : C ⥤ D
j✝ : J
⊢ H.map (α.app j✝) ≫ H.map (ι G j✝) = ι (F ⋙ H) j✝ ≫ colim.map (whiskerRight α H) ≫ post G H
state_after: case w
J : Type u₁
inst✝⁵ : Category.{v₁, u₁} J
K : Type u₂
inst✝⁴ : Category.{v₂, u₂} K
C : Type u
inst✝³ : Category.{v, u} C
F : J ⥤ C
inst✝² : HasColimitsOfShape J C
G : J ⥤ C
α : F ⟶ G
D : Type u'
inst✝¹ : Category.{v', u'} D
inst✝ : HasColimitsOfShape J D
H : C ⥤ D
j✝ : J
⊢ H.map (α.app j✝) ≫ H.map (ι G j✝) = (whiskerRight α H).app j✝ ≫ H.map (ι G j✝)

tactic: rfl
state_before: case w
J : Type u₁
inst✝⁵ : Category.{v₁, u₁} J
K : Type u₂
inst✝⁴ : Category.{v₂, u₂} K
C : Type u
inst✝³ : Category.{v, u} C
F : J ⥤ C
inst✝² : HasColimitsOfShape J C
G : J ⥤ C
α : F ⟶ G
D : Type u'
inst✝¹ : Category.{v', u'} D
inst✝ : HasColimitsOfShape J D
H : C ⥤ D
j✝ : J
⊢ H.map (α.app j✝) ≫ H.map (ι G j✝) = (whiskerRight α H).app j✝ ≫ H.map (ι G j✝)
state_after: no goals
Theorem: LinearMap.iterate_bijective
File: Mathlib/Algebra/Module/LinearMap/End.lean

tactic: rw [iterate_succ]
state_before: R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
S : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
M₃ : Type u_8
N : Type u_9
N₁ : Type u_10
N₂ : Type u_11
inst✝⁷ : Semiring R
inst✝⁶ : AddCommMonoid M
inst✝⁵ : AddCommGroup N₁
inst✝⁴ : Module R M
inst✝³ : Module R N₁
inst✝² : Monoid S
inst✝¹ : DistribMulAction S M
inst✝ : SMulCommClass R S M
f' : M →ₗ[R] M
h : Bijective ⇑f'
n : ℕ
⊢ Bijective ⇑(f' ^ (n + 1))
state_after: R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
S : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
M₃ : Type u_8
N : Type u_9
N₁ : Type u_10
N₂ : Type u_11
inst✝⁷ : Semiring R
inst✝⁶ : AddCommMonoid M
inst✝⁵ : AddCommGroup N₁
inst✝⁴ : Module R M
inst✝³ : Module R N₁
inst✝² : Monoid S
inst✝¹ : DistribMulAction S M
inst✝ : SMulCommClass R S M
f' : M →ₗ[R] M
h : Bijective ⇑f'
n : ℕ
⊢ Bijective ⇑((f' ^ n) ∘ₗ f')

tactic: exact (iterate_bijective h n).comp h
state_before: R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
S : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
M₃ : Type u_8
N : Type u_9
N₁ : Type u_10
N₂ : Type u_11
inst✝⁷ : Semiring R
inst✝⁶ : AddCommMonoid M
inst✝⁵ : AddCommGroup N₁
inst✝⁴ : Module R M
inst✝³ : Module R N₁
inst✝² : Monoid S
inst✝¹ : DistribMulAction S M
inst✝ : SMulCommClass R S M
f' : M →ₗ[R] M
h : Bijective ⇑f'
n : ℕ
⊢ Bijective ⇑((f' ^ n) ∘ₗ f')
state_after: no goals