tasksource/leandojo huggingface dataset:
Theorem: Finset.sum_smul_const_vsub_eq_vsub_affineCombination
File: Mathlib/LinearAlgebra/AffineSpace/Combination.lean

tactic: rw [sum_smul_vsub_eq_affineCombination_vsub, affineCombination_apply_const _ _ _ h]
state_before: k : Type u_1
V : Type u_3
P : Type u_4
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
S : AffineSpace V P
ι : Type u_2
s : Finset ι
ι₂ : Type ?u.348746
s₂ : Finset ι₂
w : ι → k
p₂ : ι → P
p₁ : P
h : ∑ i in s, w i = 1
⊢ ∑ i in s, w i • (p₁ -ᵥ p₂ i) = p₁ -ᵥ ↑(affineCombination k s p₂) w
Theorem: AffineSubspace.direction_le
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

tactic: simp only [direction_eq_vectorSpan, vectorSpan_def]
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
S : AffineSpace V P
p₁ p₂ : P
s1 s2 : AffineSubspace k P
h : s1 ≤ s2
⊢ direction s1 ≤ direction s2

tactic: exact vectorSpan_mono k h
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
S : AffineSpace V P
p₁ p₂ : P
s1 s2 : AffineSubspace k P
h : s1 ≤ s2
⊢ Submodule.span k (↑s1 -ᵥ ↑s1) ≤ Submodule.span k (↑s2 -ᵥ ↑s2)
Theorem: Turing.PartrecToTM2.contSupp_cons₁
File: Mathlib/Computability/TMToPartrec.lean

tactic: simp [codeSupp, codeSupp', contSupp, Finset.union_assoc]
state_before: fs : Code
k : Cont'
⊢ contSupp (Cont'.cons₁ fs k) =
    trStmts₁
        (move₂ (fun x => false) main aux
          (move₂ (fun s => decide (s = Γ'.consₗ)) stack main
            (move₂ (fun x => false) aux stack (trNormal fs (Cont'.cons₂ k))))) ∪
      codeSupp fs (Cont'.cons₂ k)
Theorem: NoZeroSMulDivisors.algebraMap_injective
File: Mathlib/Algebra/Algebra/Basic.lean

tactic: have := @smul_left_injective R A CommRing.toRing Ring.toAddCommGroup Algebra.toModule
  ‹_› 1 one_ne_zero
state_before: R : Type u_1
A : Type u_2
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Nontrivial A
inst✝¹ : Algebra R A
inst✝ : NoZeroSMulDivisors R A
⊢ Function.Injective ↑(algebraMap R A)

tactic: simpa only [algebraMap_eq_smul_one'] using this
state_before: R : Type u_1
A : Type u_2
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Nontrivial A
inst✝¹ : Algebra R A
inst✝ : NoZeroSMulDivisors R A
this : Function.Injective fun c => c • 1
⊢ Function.Injective ↑(algebraMap R A)
Theorem: Multiset.product_zero
File: Mathlib/Data/Multiset/Bind.lean

tactic: simp [SProd.sprod, product]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.56883
δ : Type ?u.56886
a : α
b : β
s : Multiset α
t : Multiset β
⊢ s ×ˢ 0 = 0
Theorem: Behrend.card_box
File: Mathlib/Combinatorics/Additive/Behrend.lean

tactic: simp [box]
state_before: α : Type ?u.797
β : Type ?u.800
n d k N : ℕ
x : Fin n → ℕ
⊢ card (box n d) = d ^ n
Theorem: CategoryTheory.Limits.limLax_μ
File: Mathlib/CategoryTheory/Monoidal/Limits.lean

tactic: dsimp
state_before: J : Type v
inst✝³ : SmallCategory J
C : Type u
inst✝² : Category C
inst✝¹ : HasLimits C
inst✝ : MonoidalCategory C
F G : J ⥤ C
j j' : J
f : j ⟶ j'
⊢ ((Functor.const J).obj (limit F ⊗ limit G)).map f ≫ (fun j => limit.π F j ⊗ limit.π G j) j' =
    (fun j => limit.π F j ⊗ limit.π G j) j ≫ (F ⊗ G).map f

tactic: simp only [Category.id_comp, ← tensor_comp, limit.w]
state_before: J : Type v
inst✝³ : SmallCategory J
C : Type u
inst✝² : Category C
inst✝¹ : HasLimits C
inst✝ : MonoidalCategory C
F G : J ⥤ C
j j' : J
f : j ⟶ j'
⊢ 𝟙 (limit F ⊗ limit G) ≫ (limit.π F j' ⊗ limit.π G j') = (limit.π F j ⊗ limit.π G j) ≫ (F.map f ⊗ G.map f)
Theorem: geom_sum_mul
File: Mathlib/Algebra/GeomSum.lean

tactic: have := (Commute.one_right x).geom_sum₂_mul n
state_before: α : Type u
inst✝ : Ring α
x : α
n : ℕ
⊢ (∑ i in range n, x ^ i) * (x - 1) = x ^ n - 1

tactic: rw [one_pow, geom_sum₂_with_one] at this
state_before: α : Type u
inst✝ : Ring α
x : α
n : ℕ
this : (∑ i in range n, x ^ i * 1 ^ (n - 1 - i)) * (x - 1) = x ^ n - 1 ^ n
⊢ (∑ i in range n, x ^ i) * (x - 1) = x ^ n - 1

tactic: exact this
state_before: α : Type u
inst✝ : Ring α
x : α
n : ℕ
this : (∑ i in range n, x ^ i) * (x - 1) = x ^ n - 1
⊢ (∑ i in range n, x ^ i) * (x - 1) = x ^ n - 1
Theorem: eq_iff_not_lt_of_le
File: Mathlib/Order/Basic.lean

tactic: rw [lt_iff_le_and_ne, not_and, Classical.not_not, eq_comm]
state_before: ι : Type ?u.4759
α✝ : Type u
β : Type v
γ : Type w
π : ι → Type ?u.4770
r : α✝ → α✝ → Prop
α : Type u_1
inst✝ : PartialOrder α
x y : α
⊢ x ≤ y → y = x ↔ ¬x < y
Theorem: Int.ceil_eq_iff
File: Mathlib/Algebra/Order/Floor.lean

tactic: rw [← ceil_le, ← Int.cast_one, ← Int.cast_sub, ← lt_ceil, Int.sub_one_lt_iff, le_antisymm_iff,
  and_comm]
state_before: F : Type ?u.222532
α : Type u_1
β : Type ?u.222538
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a : α
⊢ ⌈a⌉ = z ↔ ↑z - 1 < a ∧ a ≤ ↑z
Theorem: Set.nonempty_Ico_sdiff
File: Mathlib/Data/Set/Intervals/Group.lean

tactic: cases' lt_or_le x y with h' h'
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
x dx y dy : α
h : dy < dx
hx : 0 < dx
⊢ Nonempty ↑(Ico x (x + dx) \ Ico y (y + dy))

tactic: use x
state_before: case inl
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
x dx y dy : α
h : dy < dx
hx : 0 < dx
h' : x < y
⊢ Nonempty ↑(Ico x (x + dx) \ Ico y (y + dy))

tactic: simp [*, not_le.2 h']
state_before: case inl
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
x dx y dy : α
h : dy < dx
hx : 0 < dx
h' : x < y
⊢ x ∈ Ico x (x + dx) \ Ico y (y + dy)

tactic: use max x (x + dy)
state_before: case inr
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
x dx y dy : α
h : dy < dx
hx : 0 < dx
h' : y ≤ x
⊢ Nonempty ↑(Ico x (x + dx) \ Ico y (y + dy))

tactic: simp [*, le_refl]
state_before: case inr
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
x dx y dy : α
h : dy < dx
hx : 0 < dx
h' : y ≤ x
⊢ max x (x + dy) ∈ Ico x (x + dx) \ Ico y (y + dy)
Theorem: Int.lt_add_succ
File: Std/Data/Int/Lemmas.lean

tactic: rw [Int.add_comm, Int.add_left_comm]
state_before: a : Int
n : Nat
⊢ a + 1 + ↑n = a + ↑(succ n)

tactic: rfl
state_before: a : Int
n : Nat
⊢ a + (↑n + 1) = a + ↑(succ n)
Theorem: AddLECancellable.lt_tsub_of_add_lt_left
File: Mathlib/Algebra/Order/Sub/Defs.lean

tactic: rwa [add_comm]
state_before: α : Type u_1
β : Type ?u.41593
inst✝³ : PartialOrder α
inst✝² : AddCommSemigroup α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
ha : AddLECancellable a
h : a + c < b
⊢ c + a < b
Theorem: NormedAddGroupHom.comp_assoc
File: Mathlib/Analysis/Normed/Group/Hom.lean

tactic: ext
state_before: V : Type ?u.478988
V₁ : Type u_4
V₂ : Type u_3
V₃ : Type u_2
inst✝⁴ : SeminormedAddCommGroup V
inst✝³ : SeminormedAddCommGroup V₁
inst✝² : SeminormedAddCommGroup V₂
inst✝¹ : SeminormedAddCommGroup V₃
f✝ g✝ : NormedAddGroupHom V₁ V₂
V₄ : Type u_1
inst✝ : SeminormedAddCommGroup V₄
h : NormedAddGroupHom V₃ V₄
g : NormedAddGroupHom V₂ V₃
f : NormedAddGroupHom V₁ V₂
⊢ NormedAddGroupHom.comp (NormedAddGroupHom.comp h g) f = NormedAddGroupHom.comp h (NormedAddGroupHom.comp g f)

tactic: rfl
state_before: case H
V : Type ?u.478988
V₁ : Type u_4
V₂ : Type u_3
V₃ : Type u_2
inst✝⁴ : SeminormedAddCommGroup V
inst✝³ : SeminormedAddCommGroup V₁
inst✝² : SeminormedAddCommGroup V₂
inst✝¹ : SeminormedAddCommGroup V₃
f✝ g✝ : NormedAddGroupHom V₁ V₂
V₄ : Type u_1
inst✝ : SeminormedAddCommGroup V₄
h : NormedAddGroupHom V₃ V₄
g : NormedAddGroupHom V₂ V₃
f : NormedAddGroupHom V₁ V₂
x✝ : V₁
⊢ ↑(NormedAddGroupHom.comp (NormedAddGroupHom.comp h g) f) x✝ =
    ↑(NormedAddGroupHom.comp h (NormedAddGroupHom.comp g f)) x✝
Theorem: List.toArray_eq_toArray_eq
File: src/lean/Init/Data/Array/BasicAux.lean

tactic: apply propext
state_before: α : Type u_1
as bs : List α
⊢ (toArray as = toArray bs) = (as = bs)

tactic: apply Iff.intro
state_before: case a
α : Type u_1
as bs : List α
⊢ toArray as = toArray bs ↔ as = bs

tactic: intro h
state_before: case a.mp
α : Type u_1
as bs : List α
⊢ toArray as = toArray bs → as = bs

tactic: simp [toArray] at h
state_before: case a.mp
α : Type u_1
as bs : List α
h : toArray as = toArray bs
⊢ as = bs

tactic: have := of_toArrayAux_eq_toArrayAux h rfl
state_before: case a.mp
α : Type u_1
as bs : List α
h : toArrayAux as (Array.mkEmpty (redLength as)) = toArrayAux bs (Array.mkEmpty (redLength bs))
⊢ as = bs

tactic: exact this.1
state_before: case a.mp
α : Type u_1
as bs : List α
h : toArrayAux as (Array.mkEmpty (redLength as)) = toArrayAux bs (Array.mkEmpty (redLength bs))
this : as = bs ∧ Array.mkEmpty (redLength as) = Array.mkEmpty (redLength bs)
⊢ as = bs

tactic: intro h
state_before: case a.mpr
α : Type u_1
as bs : List α
⊢ as = bs → toArray as = toArray bs

tactic: rw [h]
state_before: case a.mpr
α : Type u_1
as bs : List α
h : as = bs
⊢ toArray as = toArray bs
Theorem: abs_sub_map_le_div
File: Mathlib/Algebra/Order/Hom/Basic.lean

tactic: rw [abs_sub_le_iff, sub_le_iff_le_add', sub_le_iff_le_add']
state_before: ι : Type ?u.44336
F : Type u_3
α : Type u_1
β : Type u_2
γ : Type ?u.44348
δ : Type ?u.44351
inst✝² : Group α
inst✝¹ : LinearOrderedAddCommGroup β
inst✝ : GroupSeminormClass F α β
f : F
x y : α
⊢ abs (↑f x - ↑f y) ≤ ↑f (x / y)

tactic: exact ⟨le_map_add_map_div _ _ _, le_map_add_map_div' _ _ _⟩
state_before: ι : Type ?u.44336
F : Type u_3
α : Type u_1
β : Type u_2
γ : Type ?u.44348
δ : Type ?u.44351
inst✝² : Group α
inst✝¹ : LinearOrderedAddCommGroup β
inst✝ : GroupSeminormClass F α β
f : F
x y : α
⊢ ↑f x ≤ ↑f y + ↑f (x / y) ∧ ↑f y ≤ ↑f x + ↑f (x / y)
Theorem: CategoryTheory.MonoidalCategory.tensor_inv_hom_id'
File: Mathlib/CategoryTheory/Monoidal/Category.lean

tactic: rw [← tensor_comp, IsIso.inv_hom_id, comp_tensor_id]
state_before: C✝ : Type u
𝒞 : Category C✝
inst✝³ : MonoidalCategory C✝
C : Type u
inst✝² : Category C
inst✝¹ : MonoidalCategory C
U V✝ W✝ X✝ Y✝ Z✝ V W X Y Z : C
f : V ⟶ W
inst✝ : IsIso f
g : X ⟶ Y
h : Y ⟶ Z
⊢ (g ⊗ inv f) ≫ (h ⊗ f) = (g ⊗ 𝟙 W) ≫ (h ⊗ 𝟙 W)
Theorem: Int.mod_nat_eq_sub_mul_floor_rat_div
File: Mathlib/Data/Rat/Floor.lean

tactic: rw [eq_sub_of_add_eq <| Int.emod_add_ediv n d, Rat.floor_int_div_nat_eq_div]
state_before: n : ℤ
d : ℕ
⊢ n % ↑d = n - ↑d * ⌊↑n / ↑d⌋
Theorem: Lagrange.natDegree_basisDivisor_self
File: Mathlib/LinearAlgebra/Lagrange.lean

tactic: rw [basisDivisor_self, natDegree_zero]
state_before: F : Type u_1
inst✝ : Field F
x y : F
⊢ natDegree (basisDivisor x x) = 0
Theorem: String.Iterator.ValidFor.curr
File: Std/Data/String/Lemmas.lean

tactic: cases h.out'
state_before: l r : List Char
it : Iterator
h : ValidFor l r it
⊢ Iterator.curr it = List.headD r default

tactic: apply get_of_valid
state_before: case refl
l r : List Char
h : ValidFor l r { s := { data := List.reverse l ++ r }, i := { byteIdx := utf8Len (List.reverse l) } }
⊢ Iterator.curr { s := { data := List.reverse l ++ r }, i := { byteIdx := utf8Len (List.reverse l) } } =
    List.headD r default
Theorem: CategoryTheory.isCoseparator_iff_faithful_preadditiveYoneda
File: Mathlib/CategoryTheory/Preadditive/Generator.lean

tactic: rw [isCoseparator_iff_faithful_yoneda_obj, ← whiskering_preadditiveYoneda, Functor.comp_obj,
  whiskeringRight_obj_obj]
state_before: C : Type u
inst✝¹ : Category C
inst✝ : Preadditive C
G : C
⊢ IsCoseparator G ↔ Faithful (preadditiveYoneda.obj G)

tactic: exact ⟨fun h => Faithful.of_comp _ (forget AddCommGroupCat), fun h => Faithful.comp _ _⟩
state_before: C : Type u
inst✝¹ : Category C
inst✝ : Preadditive C
G : C
⊢ Faithful (preadditiveYoneda.obj G ⋙ forget AddCommGroupCat) ↔ Faithful (preadditiveYoneda.obj G)
Theorem: pow_three'
File: Mathlib/Algebra/GroupPower/Basic.lean

tactic: rw [pow_succ', pow_two]
state_before: α : Type ?u.12288
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝¹ : Monoid M
inst✝ : AddMonoid A
a : M
⊢ a ^ 3 = a * a * a
Theorem: LieSubmodule.lie_le_left
File: Mathlib/Algebra/Lie/IdealOperations.lean

tactic: rw [lie_comm]
state_before: R : Type u
L : Type v
M : Type w
M₂ : Type w₁
inst✝¹⁰ : CommRing R
inst✝⁹ : LieRing L
inst✝⁸ : LieAlgebra R L
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup M₂
inst✝² : Module R M₂
inst✝¹ : LieRingModule L M₂
inst✝ : LieModule R L M₂
N N' : LieSubmodule R L M
I J : LieIdeal R L
N₂ : LieSubmodule R L M₂
⊢ ⁅I, J⁆ ≤ I

tactic: exact lie_le_right I J
state_before: R : Type u
L : Type v
M : Type w
M₂ : Type w₁
inst✝¹⁰ : CommRing R
inst✝⁹ : LieRing L
inst✝⁸ : LieAlgebra R L
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup M₂
inst✝² : Module R M₂
inst✝¹ : LieRingModule L M₂
inst✝ : LieModule R L M₂
N N' : LieSubmodule R L M
I J : LieIdeal R L
N₂ : LieSubmodule R L M₂
⊢ ⁅J, I⁆ ≤ I
Theorem: MeasureTheory.intervalIntegral_tendsto_integral_Ioi
File: Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean

tactic: let φ i := Iic (b i)
state_before: ι : Type u_2
E : Type u_1
μ : Measure ℝ
l : Filter ι
inst✝³ : IsCountablyGenerated l
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
a✝ b : ι → ℝ
f : ℝ → E
a : ℝ
hfi : IntegrableOn f (Ioi a)
hb : Tendsto b l atTop
⊢ Tendsto (fun i => ∫ (x : ℝ) in a..b i, f x ∂μ) l (𝓝 (∫ (x : ℝ) in Ioi a, f x ∂μ))

tactic: have hφ : AECover (μ.restrict <| Ioi a) l φ := aecover_Iic hb
state_before: ι : Type u_2
E : Type u_1
μ : Measure ℝ
l : Filter ι
inst✝³ : IsCountablyGenerated l
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
a✝ b : ι → ℝ
f : ℝ → E
a : ℝ
hfi : IntegrableOn f (Ioi a)
hb : Tendsto b l atTop
φ : ι → Set ℝ := fun i => Iic (b i)
⊢ Tendsto (fun i => ∫ (x : ℝ) in a..b i, f x ∂μ) l (𝓝 (∫ (x : ℝ) in Ioi a, f x ∂μ))

tactic: refine' (hφ.integral_tendsto_of_countably_generated hfi).congr' _
state_before: ι : Type u_2
E : Type u_1
μ : Measure ℝ
l : Filter ι
inst✝³ : IsCountablyGenerated l
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
a✝ b : ι → ℝ
f : ℝ → E
a : ℝ
hfi : IntegrableOn f (Ioi a)
hb : Tendsto b l atTop
φ : ι → Set ℝ := fun i => Iic (b i)
hφ : AECover (Measure.restrict μ (Ioi a)) l φ
⊢ Tendsto (fun i => ∫ (x : ℝ) in a..b i, f x ∂μ) l (𝓝 (∫ (x : ℝ) in Ioi a, f x ∂μ))

tactic: filter_upwards [hb.eventually (eventually_ge_atTop <| a)] with i hbi
state_before: ι : Type u_2
E : Type u_1
μ : Measure ℝ
l : Filter ι
inst✝³ : IsCountablyGenerated l
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
a✝ b : ι → ℝ
f : ℝ → E
a : ℝ
hfi : IntegrableOn f (Ioi a)
hb : Tendsto b l atTop
φ : ι → Set ℝ := fun i => Iic (b i)
hφ : AECover (Measure.restrict μ (Ioi a)) l φ
⊢ (fun i => ∫ (x : ℝ) in φ i, f x ∂Measure.restrict μ (Ioi a)) =ᶠ[l] fun i => ∫ (x : ℝ) in a..b i, f x ∂μ

tactic: rw [intervalIntegral.integral_of_le hbi, Measure.restrict_restrict (hφ.measurableSet i),
  inter_comm]
state_before: case h
ι : Type u_2
E : Type u_1
μ : Measure ℝ
l : Filter ι
inst✝³ : IsCountablyGenerated l
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
a✝ b : ι → ℝ
f : ℝ → E
a : ℝ
hfi : IntegrableOn f (Ioi a)
hb : Tendsto b l atTop
φ : ι → Set ℝ := fun i => Iic (b i)
hφ : AECover (Measure.restrict μ (Ioi a)) l φ
i : ι
hbi : a ≤ b i
⊢ (∫ (x : ℝ) in Iic (b i), f x ∂Measure.restrict μ (Ioi a)) = ∫ (x : ℝ) in a..b i, f x ∂μ

tactic: rfl
state_before: case h
ι : Type u_2
E : Type u_1
μ : Measure ℝ
l : Filter ι
inst✝³ : IsCountablyGenerated l
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
a✝ b : ι → ℝ
f : ℝ → E
a : ℝ
hfi : IntegrableOn f (Ioi a)
hb : Tendsto b l atTop
φ : ι → Set ℝ := fun i => Iic (b i)
hφ : AECover (Measure.restrict μ (Ioi a)) l φ
i : ι
hbi : a ≤ b i
⊢ (∫ (x : ℝ) in Ioi a ∩ φ i, f x ∂μ) = ∫ (x : ℝ) in Ioc a (b i), f x ∂μ
Theorem: Polynomial.sum_roots_eq_nextCoeff_of_monic_of_split
File: Mathlib/Data/Polynomial/Splits.lean

tactic: nth_rw 1 [eq_prod_roots_of_monic_of_splits_id hmo hP]
state_before: F : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i : K →+* L
P : K[X]
hmo : Monic P
hP : Splits (RingHom.id K) P
⊢ nextCoeff P = -Multiset.sum (roots P)

tactic: rw [Monic.nextCoeff_multiset_prod _ _ fun a ha => _]
state_before: F : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i : K →+* L
P : K[X]
hmo : Monic P
hP : Splits (RingHom.id K) P
⊢ nextCoeff (Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots P))) = -Multiset.sum (roots P)

tactic: simp_rw [nextCoeff_X_sub_C, Multiset.sum_map_neg']
state_before: F : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i : K →+* L
P : K[X]
hmo : Monic P
hP : Splits (RingHom.id K) P
⊢ Multiset.sum (Multiset.map (fun i => nextCoeff (X - ↑C i)) (roots P)) = -Multiset.sum (roots P)

tactic: simp only [monic_X_sub_C, implies_true]
state_before: F : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i : K →+* L
P : K[X]
hmo : Monic P
hP : Splits (RingHom.id K) P
⊢ ∀ (a : K), a ∈ roots P → Monic (X - ↑C a)
Theorem: IsCoprime.pow_left_iff
File: Mathlib/RingTheory/Coprime/Lemmas.lean

tactic: refine' ⟨fun h ↦ _, IsCoprime.pow_left⟩
state_before: R : Type u
I : Type v
inst✝ : CommSemiring R
x y z : R
s : I → R
t : Finset I
m n : ℕ
hm : 0 < m
⊢ IsCoprime (x ^ m) y ↔ IsCoprime x y

tactic: rw [← Finset.card_range m, ← Finset.prod_const] at h
state_before: R : Type u
I : Type v
inst✝ : CommSemiring R
x y z : R
s : I → R
t : Finset I
m n : ℕ
hm : 0 < m
h : IsCoprime (x ^ m) y
⊢ IsCoprime x y

tactic: exact h.of_prod_left 0 (Finset.mem_range.mpr hm)
state_before: R : Type u
I : Type v
inst✝ : CommSemiring R
x y z : R
s : I → R
t : Finset I
m n : ℕ
hm : 0 < m
h : IsCoprime (∏ _x in range m, x) y
⊢ IsCoprime x y
Theorem: IsLprojection.mul_compl_self
File: Mathlib/Analysis/NormedSpace/MStructure.lean

tactic: rw [coe_compl, mul_sub, mul_one, P.prop.proj.eq, sub_self]
state_before: X : Type u_2
inst✝² : NormedAddCommGroup X
M : Type u_1
inst✝¹ : Ring M
inst✝ : Module M X
P : { P // IsLprojection X P }
⊢ ↑P * ↑(Pᶜ) = 0
Theorem: IsGroupHom.one_ker_inv'
File: Mathlib/Deprecated/Subgroup.lean

tactic: rw [hf.map_mul, hf.map_inv] at h
state_before: G : Type u_1
H : Type u_2
A : Type ?u.71750
a✝ a₁ a₂ b✝ c : G
inst✝¹ : Group G
inst✝ : Group H
f : G → H
hf : IsGroupHom f
a b : G
h : f (a⁻¹ * b) = 1
⊢ f a = f b

tactic: apply inv_injective
state_before: G : Type u_1
H : Type u_2
A : Type ?u.71750
a✝ a₁ a₂ b✝ c : G
inst✝¹ : Group G
inst✝ : Group H
f : G → H
hf : IsGroupHom f
a b : G
h : (f a)⁻¹ * f b = 1
⊢ f a = f b

tactic: rw [eq_inv_of_mul_eq_one_left h]
state_before: case a
G : Type u_1
H : Type u_2
A : Type ?u.71750
a✝ a₁ a₂ b✝ c : G
inst✝¹ : Group G
inst✝ : Group H
f : G → H
hf : IsGroupHom f
a b : G
h : (f a)⁻¹ * f b = 1
⊢ (f a)⁻¹ = (f b)⁻¹
Theorem: CompleteLattice.independent_sUnion_of_directed
File: Mathlib/Order/CompactlyGenerated.lean

tactic: rw [Set.sUnion_eq_iUnion]
state_before: ι : Sort ?u.107868
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : CompleteLattice α
inst✝ : IsCompactlyGenerated α
a b : α
s✝ : Set α
s : Set (Set α)
hs : DirectedOn (fun x x_1 => x ⊆ x_1) s
h : ∀ (a : Set α), a ∈ s → SetIndependent a
⊢ SetIndependent (⋃₀ s)

tactic: exact CompleteLattice.setIndependent_iUnion_of_directed hs.directed_val (by simpa using h)
state_before: ι : Sort ?u.107868
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : CompleteLattice α
inst✝ : IsCompactlyGenerated α
a b : α
s✝ : Set α
s : Set (Set α)
hs : DirectedOn (fun x x_1 => x ⊆ x_1) s
h : ∀ (a : Set α), a ∈ s → SetIndependent a
⊢ SetIndependent (⋃ (i : ↑s), ↑i)

tactic: simpa using h
state_before: ι : Sort ?u.107868
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : CompleteLattice α
inst✝ : IsCompactlyGenerated α
a b : α
s✝ : Set α
s : Set (Set α)
hs : DirectedOn (fun x x_1 => x ⊆ x_1) s
h : ∀ (a : Set α), a ∈ s → SetIndependent a
⊢ ∀ (i : ↑s), SetIndependent ↑i
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

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
Theorem: ComputablePred.not
File: Mathlib/Computability/Halting.lean

tactic: obtain ⟨f, hf, rfl⟩ := computable_iff.1 hp
state_before: α : Type u_1
σ : Type ?u.283450
inst✝¹ : Primcodable α
inst✝ : Primcodable σ
p : α → Prop
hp : ComputablePred p
⊢ ComputablePred fun a => ¬p a

tactic: exact
  ⟨by infer_instance,
    (cond hf (const false) (const true)).of_eq fun n => by
      simp
      cases f n <;> rfl⟩
state_before: case intro.intro
α : Type u_1
σ : Type ?u.283450
inst✝¹ : Primcodable α
inst✝ : Primcodable σ
f : α → Bool
hf : Computable f
hp : ComputablePred fun a => f a = true
⊢ ComputablePred fun a => ¬(fun a => f a = true) a

tactic: infer_instance
state_before: α : Type u_1
σ : Type ?u.283450
inst✝¹ : Primcodable α
inst✝ : Primcodable σ
f : α → Bool
hf : Computable f
hp : ComputablePred fun a => f a = true
⊢ DecidablePred fun a => ¬(fun a => f a = true) a

tactic: simp
state_before: α : Type u_1
σ : Type ?u.283450
inst✝¹ : Primcodable α
inst✝ : Primcodable σ
f : α → Bool
hf : Computable f
hp : ComputablePred fun a => f a = true
n : α
⊢ (bif f n then false else true) = decide ((fun a => ¬(fun a => f a = true) a) n)

tactic: cases f n <;> rfl
state_before: α : Type u_1
σ : Type ?u.283450
inst✝¹ : Primcodable α
inst✝ : Primcodable σ
f : α → Bool
hf : Computable f
hp : ComputablePred fun a => f a = true
n : α
⊢ (bif f n then false else true) = decide (f n = false)
Theorem: BddAbove.bddAbove_image2_of_bddBelow
File: Mathlib/Order/Bounds/Basic.lean

tactic: rintro ⟨a, ha⟩ ⟨b, hb⟩
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
f : α → β → γ
s : Set α
t : Set β
a : α
b : β
h₀ : ∀ (b : β), Monotone (swap f b)
h₁ : ∀ (a : α), Antitone (f a)
⊢ BddAbove s → BddBelow t → BddAbove (Set.image2 f s t)

tactic: exact ⟨f a b, mem_upperBounds_image2_of_mem_upperBounds_of_mem_lowerBounds h₀ h₁ ha hb⟩
state_before: case intro.intro
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
f : α → β → γ
s : Set α
t : Set β
a✝ : α
b✝ : β
h₀ : ∀ (b : β), Monotone (swap f b)
h₁ : ∀ (a : α), Antitone (f a)
a : α
ha : a ∈ upperBounds s
b : β
hb : b ∈ lowerBounds t
⊢ BddAbove (Set.image2 f s t)
Theorem: CategoryTheory.Limits.initial.to_comp
File: Mathlib/CategoryTheory/Limits/Shapes/Terminal.lean

tactic: aesop
state_before: C : Type u₁
inst✝¹ : Category C
inst✝ : HasInitial C
P Q : C
f : P ⟶ Q
⊢ to P ≫ f = to Q
Theorem: Polynomial.dickson_one_one_comp_comm
File: Mathlib/RingTheory/Polynomial/Dickson.lean

tactic: rw [← dickson_one_one_mul, mul_comm, dickson_one_one_mul]
state_before: R : Type u_1
S : Type ?u.255623
inst✝¹ : CommRing R
inst✝ : CommRing S
k : ℕ
a : R
m n : ℕ
⊢ comp (dickson 1 1 m) (dickson 1 1 n) = comp (dickson 1 1 n) (dickson 1 1 m)
Theorem: nhds_basis_Ioo'
File: Mathlib/Topology/Order/Basic.lean

tactic: simp
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : TopologicalSpace α
inst✝¹ : LinearOrder α
inst✝ : OrderTopology α
a : α
hl : ∃ l, l < a
hu : ∃ u, a < u
s : Set α
⊢ (∃ l u, a ∈ Ioo l u ∧ Ioo l u ⊆ s) ↔ ∃ i, (i.fst < a ∧ a < i.snd) ∧ Ioo i.fst i.snd ⊆ s
Theorem: List.Chain.rel
File: Mathlib/Data/List/Chain.lean

tactic: rw [chain_iff_pairwise] at hl
state_before: α : Type u
β : Type v
R r : α → α → Prop
l l₁ l₂ : List α
a b : α
inst✝ : IsTrans α R
hl : Chain R a l
hb : b ∈ l
⊢ R a b

tactic: exact rel_of_pairwise_cons hl hb
state_before: α : Type u
β : Type v
R r : α → α → Prop
l l₁ l₂ : List α
a b : α
inst✝ : IsTrans α R
hl : Pairwise R (a :: l)
hb : b ∈ l
⊢ R a b
Theorem: Ordinal.div_opow_log_lt
File: Mathlib/SetTheory/Ordinal/Exponential.lean

tactic: rw [div_lt (opow_pos _ (zero_lt_one.trans hb)).ne', ← opow_succ]
state_before: b o : Ordinal
hb : 1 < b
⊢ o / b ^ log b o < b

tactic: exact lt_opow_succ_log_self hb o
state_before: b o : Ordinal
hb : 1 < b
⊢ o < b ^ succ (log b o)