tasksource/leandojo huggingface dataset:
Theorem: Matrix.neg_mulVec
File: Mathlib/Data/Matrix/Basic.lean

tactic: ext
state_before: l : Type ?u.908864
m : Type u_2
n : Type u_1
o : Type ?u.908873
m' : o → Type ?u.908878
n' : o → Type ?u.908883
R : Type ?u.908886
S : Type ?u.908889
α : Type v
β : Type w
γ : Type ?u.908896
inst✝¹ : NonUnitalNonAssocRing α
inst✝ : Fintype n
v : n → α
A : Matrix m n α
⊢ mulVec (-A) v = -mulVec A v

tactic: apply neg_dotProduct
state_before: case h
l : Type ?u.908864
m : Type u_2
n : Type u_1
o : Type ?u.908873
m' : o → Type ?u.908878
n' : o → Type ?u.908883
R : Type ?u.908886
S : Type ?u.908889
α : Type v
β : Type w
γ : Type ?u.908896
inst✝¹ : NonUnitalNonAssocRing α
inst✝ : Fintype n
v : n → α
A : Matrix m n α
x✝ : m
⊢ mulVec (-A) v x✝ = (-mulVec A v) x✝
Theorem: MeasureTheory.lintegral_map'
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: congr 1
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.1148988
δ : Type ?u.1148991
m : MeasurableSpace α
μ ν : Measure α
mβ : MeasurableSpace β
f : β → ℝ≥0∞
g : α → β
hf : AEMeasurable f
hg : AEMeasurable g
⊢ (∫⁻ (a : β), AEMeasurable.mk f hf a ∂Measure.map g μ) =
    ∫⁻ (a : β), AEMeasurable.mk f hf a ∂Measure.map (AEMeasurable.mk g hg) μ

tactic: exact Measure.map_congr hg.ae_eq_mk
state_before: case e_μ
α : Type u_2
β : Type u_1
γ : Type ?u.1148988
δ : Type ?u.1148991
m : MeasurableSpace α
μ ν : Measure α
mβ : MeasurableSpace β
f : β → ℝ≥0∞
g : α → β
hf : AEMeasurable f
hg : AEMeasurable g
⊢ Measure.map g μ = Measure.map (AEMeasurable.mk g hg) μ
Theorem: SimplexCategory.mono_iff_injective
File: Mathlib/AlgebraicTopology/SimplexCategory.lean

tactic: rw [← Functor.mono_map_iff_mono skeletalEquivalence.functor.{0}]
state_before: n m : SimplexCategory
f : n ⟶ m
⊢ Mono f ↔ Function.Injective ↑(Hom.toOrderHom f)

tactic: dsimp only [skeletalEquivalence, Functor.asEquivalence_functor]
state_before: n m : SimplexCategory
f : n ⟶ m
⊢ Mono (skeletalEquivalence.functor.map f) ↔ Function.Injective ↑(Hom.toOrderHom f)

tactic: rw [NonemptyFinLinOrdCat.mono_iff_injective, skeletalFunctor.coe_map,
  Function.Injective.of_comp_iff ULift.up_injective,
  Function.Injective.of_comp_iff' _ ULift.down_bijective]
state_before: n m : SimplexCategory
f : n ⟶ m
⊢ Mono (skeletalFunctor.map f) ↔ Function.Injective ↑(Hom.toOrderHom f)
Theorem: tsub_tsub_tsub_cancel_right
File: Mathlib/Algebra/Order/Sub/Canonical.lean

tactic: rw [tsub_tsub, add_tsub_cancel_of_le h]
state_before: α : Type u_1
inst✝⁵ : AddCommSemigroup α
inst✝⁴ : PartialOrder α
inst✝³ : ExistsAddOfLE α
inst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
h : c ≤ b
⊢ a - c - (b - c) = a - b
Theorem: Ideal.isRadical_iff_quotient_reduced
File: Mathlib/RingTheory/QuotientNilpotent.lean

tactic: conv_lhs => rw [← @Ideal.mk_ker R _ I]
state_before: R : Type u_1
inst✝ : CommRing R
I : Ideal R
⊢ IsRadical I ↔ IsReduced (R ⧸ I)

tactic: exact RingHom.ker_isRadical_iff_reduced_of_surjective (@Ideal.Quotient.mk_surjective R _ I)
state_before: R : Type u_1
inst✝ : CommRing R
I : Ideal R
⊢ IsRadical (RingHom.ker (Quotient.mk I)) ↔ IsReduced (R ⧸ I)
Theorem: Associates.out_dvd_iff
File: Mathlib/Algebra/GCDMonoid/Basic.lean

tactic: simp [Associates.out_mk, Associates.quotient_mk_eq_mk, mk_le_mk_iff_dvd_iff]
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizationMonoid α
a : α
b : Associates α
⊢ ∀ (a_1 : α),
    Associates.out (Quotient.mk (Associated.setoid α) a_1) ∣ a ↔ Quotient.mk (Associated.setoid α) a_1 ≤ Associates.mk a
Theorem: Nat.ascFactorial_le_pow_add
File: Mathlib/Data/Nat/Factorial/Basic.lean

tactic: rw [ascFactorial_zero, pow_zero]
state_before: n : ℕ
⊢ ascFactorial n 0 ≤ (n + 0) ^ 0

tactic: rw [ascFactorial_succ, pow_succ, ← add_assoc,
← Nat.succ_eq_add_one (n + k), mul_comm _ (succ (n + k))]
state_before: n k : ℕ
⊢ ascFactorial n (k + 1) ≤ (n + (k + 1)) ^ (k + 1)

tactic: exact
  Nat.mul_le_mul_of_nonneg_left
    ((ascFactorial_le_pow_add _ k).trans (Nat.pow_le_pow_of_le_left (le_succ _) _))
state_before: n k : ℕ
⊢ succ (n + k) * ascFactorial n k ≤ succ (n + k) * succ (n + k) ^ k
Theorem: List.append_bind
File: Std/Data/List/Init/Lemmas.lean

tactic: induction xs
state_before: α : Type u_1
β : Type u_2
xs ys : List α
f : α → List β
⊢ List.bind (xs ++ ys) f = List.bind xs f ++ List.bind ys f

tactic: {rfl}
state_before: case nil
α : Type u_1
β : Type u_2
ys : List α
f : α → List β
⊢ List.bind ([] ++ ys) f = List.bind [] f ++ List.bind ys f

case cons
α : Type u_1
β : Type u_2
ys : List α
f : α → List β
head✝ : α
tail✝ : List α
tail_ih✝ : List.bind (tail✝ ++ ys) f = List.bind tail✝ f ++ List.bind ys f
⊢ List.bind (head✝ :: tail✝ ++ ys) f = List.bind (head✝ :: tail✝) f ++ List.bind ys f

tactic: simp_all [cons_bind, append_assoc]
state_before: case cons
α : Type u_1
β : Type u_2
ys : List α
f : α → List β
head✝ : α
tail✝ : List α
tail_ih✝ : List.bind (tail✝ ++ ys) f = List.bind tail✝ f ++ List.bind ys f
⊢ List.bind (head✝ :: tail✝ ++ ys) f = List.bind (head✝ :: tail✝) f ++ List.bind ys f
Theorem: CategoryTheory.Limits.kernel_not_iso_of_nonzero
File: Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean

tactic: skip
state_before: C : Type u
inst✝² : Category C
inst✝¹ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝ : HasKernel f
w : f ≠ 0
I : IsIso (kernel.ι f)
⊢ Epi (kernel.ι f)

tactic: infer_instance
state_before: C : Type u
inst✝² : Category C
inst✝¹ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝ : HasKernel f
w : f ≠ 0
I : IsIso (kernel.ι f)
⊢ Epi (kernel.ι f)
Theorem: Equiv.Perm.IsThreeCycle.sign
File: Mathlib/GroupTheory/Perm/Cycle/Type.lean

tactic: rw [Equiv.Perm.sign_of_cycleType, h.cycleType]
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
h : IsThreeCycle σ
⊢ ↑Perm.sign σ = 1

tactic: rfl
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
h : IsThreeCycle σ
⊢ (-1) ^ (sum {3} + ↑card {3}) = 1
Theorem: Int.toNat_le
File: Mathlib/Data/Int/Order/Basic.lean

tactic: rw [ofNat_le.symm, toNat_eq_max, max_le_iff]
state_before: a✝ b : ℤ
n✝ : ℕ
a : ℤ
n : ℕ
⊢ toNat a ≤ n ↔ a ≤ ↑n

tactic: exact and_iff_left (ofNat_zero_le _)
state_before: a✝ b : ℤ
n✝ : ℕ
a : ℤ
n : ℕ
⊢ a ≤ ↑n ∧ 0 ≤ ↑n ↔ a ≤ ↑n
Theorem: Multiset.gcd_dedup
File: Mathlib/Algebra/GCDMonoid/Multiset.lean

tactic: simp
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
inst✝ : DecidableEq α
s : Multiset α
⊢ gcd (dedup 0) = gcd 0

tactic: by_cases h : a ∈ s <;> simp [IH, h]
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
s : Multiset α
IH : gcd (dedup s) = gcd s
⊢ gcd (dedup (a ::ₘ s)) = gcd (a ::ₘ s)

tactic: unfold gcd
state_before: case pos
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
s : Multiset α
IH : gcd (dedup s) = gcd s
h : a ∈ s
⊢ gcd s = GCDMonoid.gcd a (gcd s)

tactic: rw [← cons_erase h, fold_cons_left, ← gcd_assoc, gcd_same]
state_before: case pos
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
s : Multiset α
IH : gcd (dedup s) = gcd s
h : a ∈ s
⊢ fold GCDMonoid.gcd 0 s = GCDMonoid.gcd a (fold GCDMonoid.gcd 0 s)

tactic: apply (associated_normalize _).gcd_eq_left
state_before: case pos
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
s : Multiset α
IH : gcd (dedup s) = gcd s
h : a ∈ s
⊢ GCDMonoid.gcd a (fold GCDMonoid.gcd 0 (erase s a)) = GCDMonoid.gcd (↑normalize a) (fold GCDMonoid.gcd 0 (erase s a))
Theorem: LinearEquiv.toLinearEquiv_toContinuousLinearEquiv
File: Mathlib/Topology/Algebra/Module/FiniteDimension.lean

tactic: ext x
state_before: 𝕜 : Type u
hnorm : NontriviallyNormedField 𝕜
E : Type v
inst✝¹⁸ : AddCommGroup E
inst✝¹⁷ : Module 𝕜 E
inst✝¹⁶ : TopologicalSpace E
inst✝¹⁵ : TopologicalAddGroup E
inst✝¹⁴ : ContinuousSMul 𝕜 E
F : Type w
inst✝¹³ : AddCommGroup F
inst✝¹² : Module 𝕜 F
inst✝¹¹ : TopologicalSpace F
inst✝¹⁰ : TopologicalAddGroup F
inst✝⁹ : ContinuousSMul 𝕜 F
F' : Type x
inst✝⁸ : AddCommGroup F'
inst✝⁷ : Module 𝕜 F'
inst✝⁶ : TopologicalSpace F'
inst✝⁵ : TopologicalAddGroup F'
inst✝⁴ : ContinuousSMul 𝕜 F'
inst✝³ : CompleteSpace 𝕜
inst✝² : T2Space E
inst✝¹ : T2Space F
inst✝ : FiniteDimensional 𝕜 E
e : E ≃ₗ[𝕜] F
⊢ (toContinuousLinearEquiv e).toLinearEquiv = e

tactic: rfl
state_before: case h
𝕜 : Type u
hnorm : NontriviallyNormedField 𝕜
E : Type v
inst✝¹⁸ : AddCommGroup E
inst✝¹⁷ : Module 𝕜 E
inst✝¹⁶ : TopologicalSpace E
inst✝¹⁵ : TopologicalAddGroup E
inst✝¹⁴ : ContinuousSMul 𝕜 E
F : Type w
inst✝¹³ : AddCommGroup F
inst✝¹² : Module 𝕜 F
inst✝¹¹ : TopologicalSpace F
inst✝¹⁰ : TopologicalAddGroup F
inst✝⁹ : ContinuousSMul 𝕜 F
F' : Type x
inst✝⁸ : AddCommGroup F'
inst✝⁷ : Module 𝕜 F'
inst✝⁶ : TopologicalSpace F'
inst✝⁵ : TopologicalAddGroup F'
inst✝⁴ : ContinuousSMul 𝕜 F'
inst✝³ : CompleteSpace 𝕜
inst✝² : T2Space E
inst✝¹ : T2Space F
inst✝ : FiniteDimensional 𝕜 E
e : E ≃ₗ[𝕜] F
x : E
⊢ ↑(toContinuousLinearEquiv e).toLinearEquiv x = ↑e x
Theorem: NormedCommGroup.tendsto_nhds_one
File: Mathlib/Analysis/Normed/Group/Basic.lean

tactic: simp only [dist_one_right]
state_before: 𝓕 : Type ?u.107897
𝕜 : Type ?u.107900
α : Type u_1
ι : Type ?u.107906
κ : Type ?u.107909
E : Type u_2
F : Type ?u.107915
G : Type ?u.107918
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
inst✝ : SeminormedGroup G
s : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
f : α → E
l : Filter α
⊢ (∀ (ε : ℝ), ε > 0 → ∀ᶠ (x : α) in l, dist (f x) 1 < ε) ↔ ∀ (ε : ℝ), ε > 0 → ∀ᶠ (x : α) in l, ‖f x‖ < ε
Theorem: SimpleGraph.Walk.darts_append
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: induction p <;> simp [*]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w : V
p : Walk G u v
p' : Walk G v w
⊢ darts (append p p') = darts p ++ darts p'
Theorem: Action.rightDual_ρ
File: Mathlib/RepresentationTheory/Action.lean

tactic: rw [← SingleObj.inv_as_inv]
state_before: V : Type (u + 1)
inst✝² : LargeCategory V
G : MonCat
inst✝¹ : MonoidalCategory V
H : GroupCat
X : Action V ((forget₂ GroupCat MonCat).obj H)
inst✝ : RightRigidCategory V
h : ↑H
⊢ ↑Xᘁ.ρ h = ↑X.ρ h⁻¹ᘁ

tactic: rfl
state_before: V : Type (u + 1)
inst✝² : LargeCategory V
G : MonCat
inst✝¹ : MonoidalCategory V
H : GroupCat
X : Action V ((forget₂ GroupCat MonCat).obj H)
inst✝ : RightRigidCategory V
h : ↑H
⊢ ↑Xᘁ.ρ h = ↑X.ρ (inv h)ᘁ

case x
V : Type (u + 1)
inst✝² : LargeCategory V
G : MonCat
inst✝¹ : MonoidalCategory V
H : GroupCat
X : Action V ((forget₂ GroupCat MonCat).obj H)
inst✝ : RightRigidCategory V
h : ↑H
⊢ SingleObj H.1

case y
V : Type (u + 1)
inst✝² : LargeCategory V
G : MonCat
inst✝¹ : MonoidalCategory V
H : GroupCat
X : Action V ((forget₂ GroupCat MonCat).obj H)
inst✝ : RightRigidCategory V
h : ↑H
⊢ SingleObj H.1
Theorem: wbtw_one_zero_iff
File: Mathlib/Analysis/Convex/Between.lean

tactic: rw [wbtw_comm, wbtw_zero_one_iff]
state_before: R : Type u_1
V : Type ?u.263675
V' : Type ?u.263678
P : Type ?u.263681
P' : Type ?u.263684
inst✝⁶ : OrderedRing R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x : R
⊢ Wbtw R 1 x 0 ↔ x ∈ Set.Icc 0 1
Theorem: MvPolynomial.coe_eq_one_iff
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: rw [← coe_one, coe_inj]
state_before: σ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
φ ψ : MvPolynomial σ R
⊢ ↑φ = 1 ↔ φ = 1
Theorem: CategoryTheory.Presieve.isAmalgamation_sieveExtend
File: Mathlib/CategoryTheory/Sites/SheafOfTypes.lean

tactic: intro Y f hf
state_before: C : Type u₁
inst✝ : Category C
P Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R✝ : Presieve X
J J₂ : GrothendieckTopology C
R : Presieve X
x : FamilyOfElements P R
t : P.obj X.op
ht : FamilyOfElements.IsAmalgamation x t
⊢ FamilyOfElements.IsAmalgamation (FamilyOfElements.sieveExtend x) t

tactic: dsimp [FamilyOfElements.sieveExtend]
state_before: C : Type u₁
inst✝ : Category C
P Q U : Cᵒᵖ ⥤ Type w
X Y✝ : C
S : Sieve X
R✝ : Presieve X
J J₂ : GrothendieckTopology C
R : Presieve X
x : FamilyOfElements P R
t : P.obj X.op
ht : FamilyOfElements.IsAmalgamation x t
Y : C
f : Y ⟶ X
hf : (generate R).arrows f
⊢ P.map f.op t = FamilyOfElements.sieveExtend x f hf

tactic: rw [← ht _, ← FunctorToTypes.map_comp_apply, ← op_comp, hf.choose_spec.choose_spec.choose_spec.2]
state_before: C : Type u₁
inst✝ : Category C
P Q U : Cᵒᵖ ⥤ Type w
X Y✝ : C
S : Sieve X
R✝ : Presieve X
J J₂ : GrothendieckTopology C
R : Presieve X
x : FamilyOfElements P R
t : P.obj X.op
ht : FamilyOfElements.IsAmalgamation x t
Y : C
f : Y ⟶ X
hf : (generate R).arrows f
⊢ P.map f.op t =
    P.map (Exists.choose (_ : ∃ h g, R g ∧ h ≫ g = f)).op
      (x (Exists.choose (_ : ∃ g, R g ∧ Exists.choose (_ : ∃ h g, R g ∧ h ≫ g = f) ≫ g = f))
        (_ : R (Exists.choose (_ : ∃ g, R g ∧ Exists.choose (_ : ∃ h g, R g ∧ h ≫ g = f) ≫ g = f))))
Theorem: TendstoLocallyUniformlyOn.congr
File: Mathlib/Topology/UniformSpace/UniformConvergence.lean

tactic: rintro u hu x hx
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝¹ : UniformSpace β
F : ι → α → β
f : α → β
s s' : Set α
x : α
p : Filter ι
p' : Filter α
g : ι → α
inst✝ : TopologicalSpace α
G : ι → α → β
hf : TendstoLocallyUniformlyOn F f p s
hg : ∀ (n : ι), EqOn (F n) (G n) s
⊢ TendstoLocallyUniformlyOn G f p s

tactic: obtain ⟨t, ht, h⟩ := hf u hu x hx
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝¹ : UniformSpace β
F : ι → α → β
f : α → β
s s' : Set α
x✝ : α
p : Filter ι
p' : Filter α
g : ι → α
inst✝ : TopologicalSpace α
G : ι → α → β
hf : TendstoLocallyUniformlyOn F f p s
hg : ∀ (n : ι), EqOn (F n) (G n) s
u : Set (β × β)
hu : u ∈ 𝓤 β
x : α
hx : x ∈ s
⊢ ∃ t, t ∈ 𝓝[s] x ∧ ∀ᶠ (n : ι) in p, ∀ (y : α), y ∈ t → (f y, G n y) ∈ u

tactic: refine' ⟨s ∩ t, inter_mem self_mem_nhdsWithin ht, _⟩
state_before: case intro.intro
α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝¹ : UniformSpace β
F : ι → α → β
f : α → β
s s' : Set α
x✝ : α
p : Filter ι
p' : Filter α
g : ι → α
inst✝ : TopologicalSpace α
G : ι → α → β
hf : TendstoLocallyUniformlyOn F f p s
hg : ∀ (n : ι), EqOn (F n) (G n) s
u : Set (β × β)
hu : u ∈ 𝓤 β
x : α
hx : x ∈ s
t : Set α
ht : t ∈ 𝓝[s] x
h : ∀ᶠ (n : ι) in p, ∀ (y : α), y ∈ t → (f y, F n y) ∈ u
⊢ ∃ t, t ∈ 𝓝[s] x ∧ ∀ᶠ (n : ι) in p, ∀ (y : α), y ∈ t → (f y, G n y) ∈ u

tactic: filter_upwards [h]with i hi y hy using hg i hy.1 ▸ hi y hy.2
state_before: case intro.intro
α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝¹ : UniformSpace β
F : ι → α → β
f : α → β
s s' : Set α
x✝ : α
p : Filter ι
p' : Filter α
g : ι → α
inst✝ : TopologicalSpace α
G : ι → α → β
hf : TendstoLocallyUniformlyOn F f p s
hg : ∀ (n : ι), EqOn (F n) (G n) s
u : Set (β × β)
hu : u ∈ 𝓤 β
x : α
hx : x ∈ s
t : Set α
ht : t ∈ 𝓝[s] x
h : ∀ᶠ (n : ι) in p, ∀ (y : α), y ∈ t → (f y, F n y) ∈ u
⊢ ∀ᶠ (n : ι) in p, ∀ (y : α), y ∈ s ∩ t → (f y, G n y) ∈ u
Theorem: Int.ceil_zero
File: Mathlib/Algebra/Order/Floor.lean

tactic: rw [← cast_zero, ceil_intCast]
state_before: F : Type ?u.220824
α : Type u_1
β : Type ?u.220830
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a : α
⊢ ⌈0⌉ = 0
Theorem: Finset.weightedVSubOfPoint_insert
File: Mathlib/LinearAlgebra/AffineSpace/Combination.lean

tactic: rw [weightedVSubOfPoint_apply, weightedVSubOfPoint_apply]
state_before: k : Type u_3
V : Type u_2
P : Type u_4
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
S : AffineSpace V P
ι : Type u_1
s : Finset ι
ι₂ : Type ?u.53031
s₂ : Finset ι₂
inst✝ : DecidableEq ι
w : ι → k
p : ι → P
i : ι
⊢ ↑(weightedVSubOfPoint (insert i s) p (p i)) w = ↑(weightedVSubOfPoint s p (p i)) w

tactic: apply sum_insert_zero
state_before: k : Type u_3
V : Type u_2
P : Type u_4
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
S : AffineSpace V P
ι : Type u_1
s : Finset ι
ι₂ : Type ?u.53031
s₂ : Finset ι₂
inst✝ : DecidableEq ι
w : ι → k
p : ι → P
i : ι
⊢ ∑ i_1 in insert i s, w i_1 • (p i_1 -ᵥ p i) = ∑ i_1 in s, w i_1 • (p i_1 -ᵥ p i)

tactic: rw [vsub_self, smul_zero]
state_before: case h
k : Type u_3
V : Type u_2
P : Type u_4
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
S : AffineSpace V P
ι : Type u_1
s : Finset ι
ι₂ : Type ?u.53031
s₂ : Finset ι₂
inst✝ : DecidableEq ι
w : ι → k
p : ι → P
i : ι
⊢ w i • (p i -ᵥ p i) = 0
Theorem: Associates.mem_factorSet_top
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: dsimp only [Membership.mem]
state_before: α : Type u_1
inst✝ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
p : Associates α
hp : Irreducible p
⊢ p ∈ ⊤

tactic: dsimp only [FactorSetMem]
state_before: α : Type u_1
inst✝ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
p : Associates α
hp : Irreducible p
⊢ FactorSetMem p ⊤

tactic: split_ifs
state_before: α : Type u_1
inst✝ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
p : Associates α
hp : Irreducible p
⊢ if hp : Irreducible p then BfactorSetMem { val := p, property := hp } ⊤ else False

tactic: exact trivial
state_before: α : Type u_1
inst✝ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
p : Associates α
hp : Irreducible p
⊢ BfactorSetMem { val := p, property := hp } ⊤
Theorem: Pell.xy_coprime
File: Mathlib/NumberTheory/PellMatiyasevic.lean

tactic: let p := pell_eq a1 n
state_before: a : ℕ
a1 : 1 < a
n k : ℕ
x✝ : Nat.Prime k
kx : k ∣ xn a1 n
ky : k ∣ yn a1 n
⊢ k ∣ 1

tactic: rw [← p]
state_before: a : ℕ
a1 : 1 < a
n k : ℕ
x✝ : Nat.Prime k
kx : k ∣ xn a1 n
ky : k ∣ yn a1 n
p : xn a1 n * xn a1 n - Pell.d a1 * yn a1 n * yn a1 n = 1 := pell_eq a1 n
⊢ k ∣ 1

tactic: exact Nat.dvd_sub (le_of_lt <| Nat.lt_of_sub_eq_succ p) (kx.mul_left _) (ky.mul_left _)
state_before: a : ℕ
a1 : 1 < a
n k : ℕ
x✝ : Nat.Prime k
kx : k ∣ xn a1 n
ky : k ∣ yn a1 n
p : xn a1 n * xn a1 n - Pell.d a1 * yn a1 n * yn a1 n = 1 := pell_eq a1 n
⊢ k ∣ xn a1 n * xn a1 n - Pell.d a1 * yn a1 n * yn a1 n
Theorem: FreeAlgebra.lift_ι_apply
File: Mathlib/Algebra/FreeAlgebra.lean

tactic: rw [ι_def, lift]
state_before: R : Type u_2
inst✝² : CommSemiring R
X : Type u_3
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
f : X → A
x : X
⊢ ↑(↑(lift R) f) (ι R x) = f x

tactic: rfl
state_before: R : Type u_2
inst✝² : CommSemiring R
X : Type u_3
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
f : X → A
x : X
⊢ ↑(↑{ toFun := FreeAlgebra.liftAux R, invFun := fun F => ↑F ∘ ι R,
              left_inv := (_ : ∀ (f : X → A), (fun F => ↑F ∘ ι R) (FreeAlgebra.liftAux R f) = f),
              right_inv := (_ : ∀ (F : FreeAlgebra R X →ₐ[R] A), FreeAlgebra.liftAux R ((fun F => ↑F ∘ ι R) F) = F) }
          f)
      (Quot.mk (Rel R X) (Pre.of x)) =
    f x
Theorem: LieSubalgebra.exists_lieIdeal_coe_eq_iff
File: Mathlib/Algebra/Lie/Submodule.lean

tactic: simp only [← coe_to_submodule_eq_iff, LieIdeal.coe_to_lieSubalgebra_to_submodule,
  Submodule.exists_lieSubmodule_coe_eq_iff L]
state_before: R : Type u
L : Type v
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
K : LieSubalgebra R L
⊢ (∃ I, ↑R L I = K) ↔ ∀ (x y : L), y ∈ K → ⁅x, y⁆ ∈ K

tactic: simp only [mem_coe_submodule]
state_before: R : Type u
L : Type v
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
K : LieSubalgebra R L
⊢ (∀ (x m : L), m ∈ K.toSubmodule → ⁅x, m⁆ ∈ K.toSubmodule) ↔ ∀ (x y : L), y ∈ K → ⁅x, y⁆ ∈ K
Theorem: smul_inv
File: Mathlib/GroupTheory/GroupAction/Group.lean

tactic: rw [inv_eq_iff_mul_eq_one, smul_mul_smul, mul_right_inv, mul_right_inv, one_smul]
state_before: α : Type u
β : Type v
γ : Type w
inst✝⁴ : Group α
inst✝³ : MulAction α β
inst✝² : Group β
inst✝¹ : SMulCommClass α β β
inst✝ : IsScalarTower α β β
c : α
x : β
⊢ (c • x)⁻¹ = c⁻¹ • x⁻¹
Theorem: PartENat.lt_add_one_iff_lt
File: Mathlib/Data/Nat/PartENat.lean

tactic: refine ⟨le_of_lt_add_one, fun h => ?_⟩
state_before: x y : PartENat
hx : x ≠ ⊤
⊢ x < y + 1 ↔ x ≤ y

tactic: rcases ne_top_iff.mp hx with ⟨m, rfl⟩
state_before: x y : PartENat
hx : x ≠ ⊤
h : x ≤ y
⊢ x < y + 1

tactic: induction' y using PartENat.casesOn with n
state_before: case intro
y : PartENat
m : ℕ
hx : ↑m ≠ ⊤
h : ↑m ≤ y
⊢ ↑m < y + 1

tactic: norm_cast
state_before: case intro.a
y : PartENat
m : ℕ
hx : ↑m ≠ ⊤
h✝ : ↑m ≤ y
n : ℕ
h : ↑m ≤ ↑n
⊢ ↑m < ↑n + 1

tactic: apply Nat.lt_succ_of_le
state_before: case intro.a
y : PartENat
m : ℕ
hx : ↑m ≠ ⊤
h✝ : ↑m ≤ y
n : ℕ
h : ↑m ≤ ↑n
⊢ m < n + 1

tactic: norm_cast at h
state_before: case intro.a.a
y : PartENat
m : ℕ
hx : ↑m ≠ ⊤
h✝ : ↑m ≤ y
n : ℕ
h : ↑m ≤ ↑n
⊢ m ≤ n

tactic: rw [top_add]
state_before: case intro.a
y : PartENat
m : ℕ
hx : ↑m ≠ ⊤
h✝ : ↑m ≤ y
h : ↑m ≤ ⊤
⊢ ↑m < ⊤ + 1

tactic: apply natCast_lt_top
state_before: case intro.a
y : PartENat
m : ℕ
hx : ↑m ≠ ⊤
h✝ : ↑m ≤ y
h : ↑m ≤ ⊤
⊢ ↑m < ⊤
Theorem: Int.toNat_sub
File: Std/Data/Int/Lemmas.lean

tactic: rw [← Int.subNatNat_eq_coe]
state_before: m n : Nat
⊢ toNat (↑m - ↑n) = m - n

tactic: refine subNatNat_elim m n (fun m n i => toNat i = m - n) (fun i n => ?_) (fun i n => ?_)
state_before: m n : Nat
⊢ toNat (subNatNat m n) = m - n

tactic: exact (Nat.add_sub_cancel_left ..).symm
state_before: case refine_1
m n✝ i n : Nat
⊢ (fun m n i => toNat i = m - n) (n + i) n ↑i

tactic: dsimp
state_before: case refine_2
m n✝ i n : Nat
⊢ (fun m n i => toNat i = m - n) n (n + i + 1) -[i+1]

tactic: rw [Nat.add_assoc, Nat.sub_eq_zero_of_le (Nat.le_add_right ..)]
state_before: case refine_2
m n✝ i n : Nat
⊢ toNat -[i+1] = n - (n + i + 1)

tactic: rfl
state_before: case refine_2
m n✝ i n : Nat
⊢ toNat -[i+1] = 0
Theorem: Option.join_pmap_eq_pmap_join
File: Mathlib/Data/Option/Basic.lean

tactic: rcases x with (_ | _ | x) <;> simp
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.13574
δ : Type ?u.13577
p : α → Prop
f✝ : (a : α) → p a → β
x✝ : Option α
f : (a : α) → p a → β
x : Option (Option α)
H : ∀ (a : Option α), a ∈ x → ∀ (a_2 : α), a_2 ∈ a → p a_2
⊢ join (pmap (pmap f) x H) = pmap f (join x) (_ : ∀ (a : α), a ∈ join x → p a)
Theorem: quadratic_eq_zero_iff
File: Mathlib/Algebra/QuadraticDiscriminant.lean

tactic: rw [quadratic_eq_zero_iff_discrim_eq_sq ha, h, sq, mul_self_eq_mul_self_iff]
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NeZero 2
a b c x✝ : K
ha : a ≠ 0
s : K
h : discrim a b c = s * s
x : K
⊢ a * x * x + b * x + c = 0 ↔ x = (-b + s) / (2 * a) ∨ x = (-b - s) / (2 * a)

tactic: field_simp
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NeZero 2
a b c x✝ : K
ha : a ≠ 0
s : K
h : discrim a b c = s * s
x : K
⊢ s = 2 * a * x + b ∨ s = -(2 * a * x + b) ↔ x = (-b + s) / (2 * a) ∨ x = (-b - s) / (2 * a)

tactic: apply or_congr
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NeZero 2
a b c x✝ : K
ha : a ≠ 0
s : K
h : discrim a b c = s * s
x : K
⊢ s = 2 * a * x + b ∨ s = -b + -(2 * a * x) ↔ x * (2 * a) = -b + s ∨ x * (2 * a) = -b - s

tactic: constructor <;> intro h' <;> linear_combination -h'
state_before: case h₁
K : Type u_1
inst✝¹ : Field K
inst✝ : NeZero 2
a b c x✝ : K
ha : a ≠ 0
s : K
h : discrim a b c = s * s
x : K
⊢ s = 2 * a * x + b ↔ x * (2 * a) = -b + s

tactic: constructor <;> intro h' <;> linear_combination h'
state_before: case h₂
K : Type u_1
inst✝¹ : Field K
inst✝ : NeZero 2
a b c x✝ : K
ha : a ≠ 0
s : K
h : discrim a b c = s * s
x : K
⊢ s = -b + -(2 * a * x) ↔ x * (2 * a) = -b - s