tasksource/leandojo huggingface dataset:
Theorem: Ordnode.length_toList'
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: rw [toList_node, List.length_append, List.length_cons, length_toList' l,
    length_toList' r]
state_before: α : Type u_1
size✝ : ℕ
l : Ordnode α
x✝ : α
r : Ordnode α
⊢ List.length (toList (node size✝ l x✝ r)) = realSize (node size✝ l x✝ r)

tactic: rfl
state_before: α : Type u_1
size✝ : ℕ
l : Ordnode α
x✝ : α
r : Ordnode α
⊢ realSize l + Nat.succ (realSize r) = realSize (node size✝ l x✝ r)
Theorem: EuclideanDomain.val_dvd_le
File: Mathlib/Algebra/EuclideanDomain/Defs.lean

tactic: rintro rfl
state_before: R : Type u
inst✝ : EuclideanDomain R
b d : R
ha : b * d ≠ 0
⊢ d = 0 → b * d = 0

tactic: exact mul_zero _
state_before: R : Type u
inst✝ : EuclideanDomain R
b : R
ha : b * 0 ≠ 0
⊢ b * 0 = 0
Theorem: max_eq_half_add_add_abs_sub
File: Mathlib/Topology/ContinuousFunction/Algebra.lean

tactic: cases' le_total x y with h h <;> field_simp [h, abs_of_nonneg, abs_of_nonpos, mul_two]
state_before: R : Type u_1
inst✝ : LinearOrderedField R
x y : R
⊢ max x y = 2⁻¹ * (x + y + abs (x - y))

tactic: abel
state_before: case inl
R : Type u_1
inst✝ : LinearOrderedField R
x y : R
h : x ≤ y
⊢ y + y = x + y + (y - x)
Theorem: Finset.Ici_eq_cons_Ioi
File: Mathlib/Data/Finset/LocallyFinite.lean

tactic: classical rw [cons_eq_insert, Ioi_insert]
state_before: ι : Type ?u.115956
α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrderTop α
a : α
⊢ Ici a = cons a (Ioi a) (_ : ¬a ∈ Ioi a)

tactic: rw [cons_eq_insert, Ioi_insert]
state_before: ι : Type ?u.115956
α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrderTop α
a : α
⊢ Ici a = cons a (Ioi a) (_ : ¬a ∈ Ioi a)
Theorem: support_comp_inv_smul₀
File: Mathlib/Data/Set/Pointwise/Support.lean

tactic: ext x
state_before: α : Type u_2
β : Type u_3
γ : Type u_1
inst✝² : GroupWithZero α
inst✝¹ : MulAction α β
inst✝ : Zero γ
c : α
hc : c ≠ 0
f : β → γ
⊢ (support fun x => f (c⁻¹ • x)) = c • support f

tactic: simp only [mem_smul_set_iff_inv_smul_mem₀ hc, mem_support]
state_before: case h
α : Type u_2
β : Type u_3
γ : Type u_1
inst✝² : GroupWithZero α
inst✝¹ : MulAction α β
inst✝ : Zero γ
c : α
hc : c ≠ 0
f : β → γ
x : β
⊢ (x ∈ support fun x => f (c⁻¹ • x)) ↔ x ∈ c • support f
Theorem: Ordnode.dual_rotateL
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: cases r <;> simp [rotateL, rotateR, dual_node']
state_before: α : Type u_1
l : Ordnode α
x : α
r : Ordnode α
⊢ dual (rotateL l x r) = rotateR (dual r) x (dual l)

tactic: split_ifs <;>
simp [dual_node3L, dual_node4L, node3R, add_comm]
state_before: case node
α : Type u_1
l : Ordnode α
x : α
size✝ : ℕ
l✝ : Ordnode α
x✝ : α
r✝ : Ordnode α
⊢ dual (if size l✝ < ratio * size r✝ then node3L l x l✝ x✝ r✝ else node4L l x l✝ x✝ r✝) =
    if size l✝ < ratio * size r✝ then node3R (dual r✝) x✝ (dual l✝) x (dual l)
    else node4R (dual r✝) x✝ (dual l✝) x (dual l)
Theorem: Std.BinomialHeapImp.Heap.WellFormed.tail
File: Std/Data/BinomialHeap.lean

tactic: simp only [Heap.tail]
state_before: α : Type u_1
s : Heap α
le : α → α → Bool
n : Nat
hwf : WellFormed le n s
⊢ WellFormed le 0 (Heap.tail le s)

tactic: match eq : s.tail? le with
| none => exact Heap.WellFormed.nil
| some tl => exact hwf.tail? eq
state_before: α : Type u_1
s : Heap α
le : α → α → Bool
n : Nat
hwf : WellFormed le n s
⊢ WellFormed le 0 (Option.getD (Heap.tail? le s) Heap.nil)

tactic: exact Heap.WellFormed.nil
state_before: α : Type u_1
s : Heap α
le : α → α → Bool
n : Nat
hwf : WellFormed le n s
eq : Heap.tail? le s = none
⊢ WellFormed le 0 (Option.getD none Heap.nil)

tactic: exact hwf.tail? eq
state_before: α : Type u_1
s : Heap α
le : α → α → Bool
n : Nat
hwf : WellFormed le n s
tl : Heap α
eq : Heap.tail? le s = some tl
⊢ WellFormed le 0 (Option.getD (some tl) Heap.nil)
Theorem: PowerBasis.aeval_minpolyGen
File: Mathlib/RingTheory/PowerBasis.lean

tactic: simp_rw [minpolyGen, AlgHom.map_sub, AlgHom.map_sum, AlgHom.map_mul, AlgHom.map_pow, aeval_C, ←
  Algebra.smul_def, aeval_X]
state_before: R : Type ?u.96690
S : Type u_2
T : Type ?u.96696
inst✝⁸ : CommRing R
inst✝⁷ : Ring S
inst✝⁶ : Algebra R S
A : Type u_1
B : Type ?u.97002
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : IsDomain B
inst✝² : Algebra A B
K : Type ?u.97424
inst✝¹ : Field K
inst✝ : Algebra A S
pb : PowerBasis A S
⊢ ↑(aeval pb.gen) (minpolyGen pb) = 0

tactic: refine' sub_eq_zero.mpr ((pb.basis.total_repr (pb.gen ^ pb.dim)).symm.trans _)
state_before: R : Type ?u.96690
S : Type u_2
T : Type ?u.96696
inst✝⁸ : CommRing R
inst✝⁷ : Ring S
inst✝⁶ : Algebra R S
A : Type u_1
B : Type ?u.97002
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : IsDomain B
inst✝² : Algebra A B
K : Type ?u.97424
inst✝¹ : Field K
inst✝ : Algebra A S
pb : PowerBasis A S
⊢ pb.gen ^ pb.dim - ∑ x : Fin pb.dim, ↑(↑pb.basis.repr (pb.gen ^ pb.dim)) x • pb.gen ^ ↑x = 0

tactic: rw [Finsupp.total_apply, Finsupp.sum_fintype] <;>
  simp only [pb.coe_basis, zero_smul, eq_self_iff_true, imp_true_iff]
state_before: R : Type ?u.96690
S : Type u_2
T : Type ?u.96696
inst✝⁸ : CommRing R
inst✝⁷ : Ring S
inst✝⁶ : Algebra R S
A : Type u_1
B : Type ?u.97002
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : IsDomain B
inst✝² : Algebra A B
K : Type ?u.97424
inst✝¹ : Field K
inst✝ : Algebra A S
pb : PowerBasis A S
⊢ ↑(Finsupp.total (Fin pb.dim) S A ↑pb.basis) (↑pb.basis.repr (pb.gen ^ pb.dim)) =
    ∑ x : Fin pb.dim, ↑(↑pb.basis.repr (pb.gen ^ pb.dim)) x • pb.gen ^ ↑x
Theorem: Submodule.mem_dualCoannihilator
File: Mathlib/LinearAlgebra/Dual.lean

tactic: simp_rw [dualCoannihilator, mem_comap, mem_dualAnnihilator, Module.Dual.eval_apply]
state_before: R : Type u
M : Type v
inst✝² : CommSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
W : Submodule R M
Φ : Submodule R (Module.Dual R M)
x : M
⊢ x ∈ dualCoannihilator Φ ↔ ∀ (φ : Module.Dual R M), φ ∈ Φ → ↑φ x = 0
Theorem: Asymptotics.isTheta_norm_left
File: Mathlib/Analysis/Asymptotics/Theta.lean

tactic: simp [IsTheta]
state_before: α : Type u_1
β : Type ?u.21394
E : Type ?u.21397
F : Type u_2
G : Type ?u.21403
E' : Type u_3
F' : Type ?u.21409
G' : Type ?u.21412
E'' : Type ?u.21415
F'' : Type ?u.21418
G'' : Type ?u.21421
R : Type ?u.21424
R' : Type ?u.21427
𝕜 : Type ?u.21430
𝕜' : Type ?u.21433
inst✝¹² : Norm E
inst✝¹¹ : Norm F
inst✝¹⁰ : Norm G
inst✝⁹ : SeminormedAddCommGroup E'
inst✝⁸ : SeminormedAddCommGroup F'
inst✝⁷ : SeminormedAddCommGroup G'
inst✝⁶ : NormedAddCommGroup E''
inst✝⁵ : NormedAddCommGroup F''
inst✝⁴ : NormedAddCommGroup G''
inst✝³ : SeminormedRing R
inst✝² : SeminormedRing R'
inst✝¹ : NormedField 𝕜
inst✝ : NormedField 𝕜'
c c' c₁ c₂ : ℝ
f : α → E
g : α → F
k : α → G
f' : α → E'
g' : α → F'
k' : α → G'
f'' : α → E''
g'' : α → F''
l l' : Filter α
⊢ (fun x => ‖f' x‖) =Θ[l] g ↔ f' =Θ[l] g
Theorem: CategoryTheory.FinitaryExtensive.vanKampen
File: Mathlib/CategoryTheory/Extensive.lean

tactic: let X := F.obj ⟨WalkingPair.left⟩
state_before: J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
X Y : C
inst✝ : FinitaryExtensive C
F : Discrete WalkingPair ⥤ C
c : Cocone F
hc : IsColimit c
⊢ IsVanKampenColimit c

tactic: let Y := F.obj ⟨WalkingPair.right⟩
state_before: J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
X✝ Y : C
inst✝ : FinitaryExtensive C
F : Discrete WalkingPair ⥤ C
c : Cocone F
hc : IsColimit c
X : C := F.obj { as := WalkingPair.left }
⊢ IsVanKampenColimit c

tactic: clear_value X Y
state_before: J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
X✝ Y✝ : C
inst✝ : FinitaryExtensive C
F : Discrete WalkingPair ⥤ C
c : Cocone F
hc : IsColimit c
X : C := F.obj { as := WalkingPair.left }
Y : C := F.obj { as := WalkingPair.right }
this : F = pair X Y
⊢ IsVanKampenColimit c

tactic: subst this
state_before: J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
X✝ Y✝ : C
inst✝ : FinitaryExtensive C
F : Discrete WalkingPair ⥤ C
c : Cocone F
hc : IsColimit c
Y X : C
this : F = pair X Y
⊢ IsVanKampenColimit c

tactic: exact FinitaryExtensive.van_kampen' c hc
state_before: J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
X✝ Y✝ : C
inst✝ : FinitaryExtensive C
Y X : C
c : Cocone (pair X Y)
hc : IsColimit c
⊢ IsVanKampenColimit c

tactic: apply Functor.hext
state_before: J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
X✝ Y✝ : C
inst✝ : FinitaryExtensive C
F : Discrete WalkingPair ⥤ C
c : Cocone F
hc : IsColimit c
X : C := F.obj { as := WalkingPair.left }
Y : C := F.obj { as := WalkingPair.right }
⊢ F = pair X Y

tactic: rintro ⟨⟨⟩⟩ <;> rfl
state_before: case h_obj
J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
X✝ Y✝ : C
inst✝ : FinitaryExtensive C
F : Discrete WalkingPair ⥤ C
c : Cocone F
hc : IsColimit c
X : C := F.obj { as := WalkingPair.left }
Y : C := F.obj { as := WalkingPair.right }
⊢ ∀ (X_1 : Discrete WalkingPair), F.obj X_1 = (pair X Y).obj X_1

tactic: rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩ <;> simp
state_before: case h_map
J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
X✝ Y✝ : C
inst✝ : FinitaryExtensive C
F : Discrete WalkingPair ⥤ C
c : Cocone F
hc : IsColimit c
X : C := F.obj { as := WalkingPair.left }
Y : C := F.obj { as := WalkingPair.right }
⊢ ∀ (X_1 Y_1 : Discrete WalkingPair) (f : X_1 ⟶ Y_1), HEq (F.map f) ((pair X Y).map f)
Theorem: Finset.Ico_diff_Ioo_self
File: Mathlib/Data/Finset/LocallyFinite.lean

tactic: simp [← coe_inj, h]
state_before: ι : Type ?u.102931
α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : LocallyFiniteOrder α
a b c : α
inst✝ : DecidableEq α
h : a < b
⊢ Ico a b \ Ioo a b = {a}
Theorem: Filter.HasBasis.isBasis
File: Mathlib/Order/Filter/Bases.lean

tactic: simpa only [h.mem_iff] using inter_mem (h.mem_of_mem hi) (h.mem_of_mem hj)
state_before: α : Type u_1
β : Type ?u.14022
γ : Type ?u.14025
ι : Sort u_2
ι' : Sort ?u.14031
l l' : Filter α
p : ι → Prop
s : ι → Set α
t : Set α
i : ι
p' : ι' → Prop
s' : ι' → Set α
i' : ι'
h : HasBasis l p s
i✝ j✝ : ι
hi : p i✝
hj : p j✝
⊢ ∃ k, p k ∧ s k ⊆ s i✝ ∩ s j✝
Theorem: GaloisConnection.l_csSup'
File: Mathlib/Order/ConditionallyCompleteLattice/Basic.lean

tactic: rw [gc.l_csSup hne hbdd, sSup_image']
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.99502
ι : Sort ?u.99505
inst✝² : ConditionallyCompleteLattice α
inst✝¹ : ConditionallyCompleteLattice β
inst✝ : Nonempty ι
l : α → β
u : β → α
gc : GaloisConnection l u
s : Set α
hne : Set.Nonempty s
hbdd : BddAbove s
⊢ l (sSup s) = sSup (l '' s)
Theorem: integrableOn_Icc_iff_integrableOn_Ioc'
File: Mathlib/MeasureTheory/Integral/IntegrableOn.lean

tactic: by_cases hab : a ≤ b
state_before: α : Type u_1
β : Type ?u.3069209
E : Type u_2
F : Type ?u.3069215
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : PartialOrder α
inst✝ : MeasurableSingletonClass α
f : α → E
μ : MeasureTheory.Measure α
a b : α
ha : ↑↑μ {a} ≠ ⊤
⊢ IntegrableOn f (Icc a b) ↔ IntegrableOn f (Ioc a b)

tactic: rw [← Ioc_union_left hab, integrableOn_union,
  eq_true (integrableOn_singleton_iff.mpr <| Or.inr ha.lt_top), and_true_iff]
state_before: case pos
α : Type u_1
β : Type ?u.3069209
E : Type u_2
F : Type ?u.3069215
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : PartialOrder α
inst✝ : MeasurableSingletonClass α
f : α → E
μ : MeasureTheory.Measure α
a b : α
ha : ↑↑μ {a} ≠ ⊤
hab : a ≤ b
⊢ IntegrableOn f (Icc a b) ↔ IntegrableOn f (Ioc a b)

tactic: rw [Icc_eq_empty hab, Ioc_eq_empty]
state_before: case neg
α : Type u_1
β : Type ?u.3069209
E : Type u_2
F : Type ?u.3069215
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : PartialOrder α
inst✝ : MeasurableSingletonClass α
f : α → E
μ : MeasureTheory.Measure α
a b : α
ha : ↑↑μ {a} ≠ ⊤
hab : ¬a ≤ b
⊢ IntegrableOn f (Icc a b) ↔ IntegrableOn f (Ioc a b)

tactic: contrapose! hab
state_before: case neg
α : Type u_1
β : Type ?u.3069209
E : Type u_2
F : Type ?u.3069215
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : PartialOrder α
inst✝ : MeasurableSingletonClass α
f : α → E
μ : MeasureTheory.Measure α
a b : α
ha : ↑↑μ {a} ≠ ⊤
hab : ¬a ≤ b
⊢ ¬a < b

tactic: exact hab.le
state_before: case neg
α : Type u_1
β : Type ?u.3069209
E : Type u_2
F : Type ?u.3069215
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : PartialOrder α
inst✝ : MeasurableSingletonClass α
f : α → E
μ : MeasureTheory.Measure α
a b : α
ha : ↑↑μ {a} ≠ ⊤
hab : a < b
⊢ a ≤ b
Theorem: Mathlib.Tactic.Group.zpow_trick
File: Mathlib/Tactic/Group.lean

tactic: rw [mul_assoc, ← zpow_add]
state_before: G : Type u_1
inst✝ : Group G
a b : G
n m : ℤ
⊢ a * b ^ n * b ^ m = a * b ^ (n + m)
Theorem: Real.surjOn_tan
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Arctan.lean

tactic: rw [tendsto_comp_coe_Ioo_atBot this]
state_before: this : -(π / 2) < π / 2
⊢ Tendsto (fun x => tan ↑x) atBot atBot

tactic: exact tendsto_tan_neg_pi_div_two
state_before: this : -(π / 2) < π / 2
⊢ Tendsto tan (𝓝[Ioi (-(π / 2))] (-(π / 2))) atBot

tactic: rw [tendsto_comp_coe_Ioo_atTop this]
state_before: this : -(π / 2) < π / 2
⊢ Tendsto (fun x => tan ↑x) atTop atTop

tactic: exact tendsto_tan_pi_div_two
state_before: this : -(π / 2) < π / 2
⊢ Tendsto tan (𝓝[Iio (π / 2)] (π / 2)) atTop
Theorem: normalizeScaleRoots_eval₂_leadingCoeff_mul
File: Mathlib/RingTheory/IntegralClosure.lean

tactic: rw [eval₂_eq_sum_range, eval₂_eq_sum_range, Finset.mul_sum]
state_before: R : Type u_1
A : Type ?u.888354
B : Type ?u.888357
S : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : CommRing B
inst✝² : CommRing S
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f✝ : R →+* S
p : R[X]
x✝ : S
h : 1 ≤ natDegree p
f : R →+* S
x : S
⊢ eval₂ f (↑f (leadingCoeff p) * x) (normalizeScaleRoots p) = ↑f (leadingCoeff p) ^ (natDegree p - 1) * eval₂ f x p

tactic: apply Finset.sum_congr
state_before: R : Type u_1
A : Type ?u.888354
B : Type ?u.888357
S : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : CommRing B
inst✝² : CommRing S
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f✝ : R →+* S
p : R[X]
x✝ : S
h : 1 ≤ natDegree p
f : R →+* S
x : S
⊢ ∑ i in Finset.range (natDegree (normalizeScaleRoots p) + 1),
      ↑f (coeff (normalizeScaleRoots p) i) * (↑f (leadingCoeff p) * x) ^ i =
    ∑ x_1 in Finset.range (natDegree p + 1), ↑f (leadingCoeff p) ^ (natDegree p - 1) * (↑f (coeff p x_1) * x ^ x_1)

tactic: intro n _hn
state_before: case a
R : Type u_1
A : Type ?u.888354
B : Type ?u.888357
S : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : CommRing B
inst✝² : CommRing S
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f✝ : R →+* S
p : R[X]
x✝ : S
h : 1 ≤ natDegree p
f : R →+* S
x : S
⊢ ∀ (x_1 : ℕ),
    x_1 ∈ Finset.range (natDegree p + 1) →
      ↑f (coeff (normalizeScaleRoots p) x_1) * (↑f (leadingCoeff p) * x) ^ x_1 =
        ↑f (leadingCoeff p) ^ (natDegree p - 1) * (↑f (coeff p x_1) * x ^ x_1)

tactic: rw [mul_pow, ← mul_assoc, ← f.map_pow, ← f.map_mul,
  normalizeScaleRoots_coeff_mul_leadingCoeff_pow _ _ h, f.map_mul, f.map_pow]
state_before: case a
R : Type u_1
A : Type ?u.888354
B : Type ?u.888357
S : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : CommRing B
inst✝² : CommRing S
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f✝ : R →+* S
p : R[X]
x✝ : S
h : 1 ≤ natDegree p
f : R →+* S
x : S
n : ℕ
_hn : n ∈ Finset.range (natDegree p + 1)
⊢ ↑f (coeff (normalizeScaleRoots p) n) * (↑f (leadingCoeff p) * x) ^ n =
    ↑f (leadingCoeff p) ^ (natDegree p - 1) * (↑f (coeff p n) * x ^ n)

tactic: ring
state_before: case a
R : Type u_1
A : Type ?u.888354
B : Type ?u.888357
S : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : CommRing B
inst✝² : CommRing S
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f✝ : R →+* S
p : R[X]
x✝ : S
h : 1 ≤ natDegree p
f : R →+* S
x : S
n : ℕ
_hn : n ∈ Finset.range (natDegree p + 1)
⊢ ↑f (coeff p n) * ↑f (leadingCoeff p) ^ (natDegree p - 1) * x ^ n =
    ↑f (leadingCoeff p) ^ (natDegree p - 1) * (↑f (coeff p n) * x ^ n)

tactic: rw [natDegree_eq_of_degree_eq (normalizeScaleRoots_degree p)]
state_before: case h
R : Type u_1
A : Type ?u.888354
B : Type ?u.888357
S : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : CommRing B
inst✝² : CommRing S
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f✝ : R →+* S
p : R[X]
x✝ : S
h : 1 ≤ natDegree p
f : R →+* S
x : S
⊢ Finset.range (natDegree (normalizeScaleRoots p) + 1) = Finset.range (natDegree p + 1)
Theorem: EuclideanSpace.inner_single_left
File: Mathlib/Analysis/InnerProductSpace/PiL2.lean

tactic: simp [apply_ite conj]
state_before: ι : Type u_1
ι' : Type ?u.585299
𝕜 : Type u_2
inst✝¹⁰ : IsROrC 𝕜
E : Type ?u.585308
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : InnerProductSpace 𝕜 E
E' : Type ?u.585328
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : InnerProductSpace 𝕜 E'
F : Type ?u.585346
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : InnerProductSpace ℝ F
F' : Type ?u.585366
inst✝³ : NormedAddCommGroup F'
inst✝² : InnerProductSpace ℝ F'
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
i : ι
a : 𝕜
v : EuclideanSpace 𝕜 ι
⊢ inner (single i a) v = ↑(starRingEnd 𝕜) a * v i
Theorem: Equiv.equivCongr_refl
File: Mathlib/Logic/Equiv/Defs.lean

tactic: ext
state_before: α✝ : Sort u
β✝ : Sort v
γ : Sort w
α : Sort u_1
β : Sort u_2
⊢ equivCongr (Equiv.refl α) (Equiv.refl β) = Equiv.refl (α ≃ β)

tactic: rfl
state_before: case H.H
α✝ : Sort u
β✝ : Sort v
γ : Sort w
α : Sort u_1
β : Sort u_2
x✝¹ : α ≃ β
x✝ : α
⊢ ↑(↑(equivCongr (Equiv.refl α) (Equiv.refl β)) x✝¹) x✝ = ↑(↑(Equiv.refl (α ≃ β)) x✝¹) x✝
Theorem: MeasureTheory.Measure.singularPart_le
File: Mathlib/MeasureTheory/Decomposition/Lebesgue.lean

tactic: by_cases hl : HaveLebesgueDecomposition μ ν
state_before: α : Type u_1
β : Type ?u.33660
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
⊢ singularPart μ ν ≤ μ

tactic: cases' (haveLebesgueDecomposition_spec μ ν).2 with _ h
state_before: case pos
α : Type u_1
β : Type ?u.33660
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
hl : HaveLebesgueDecomposition μ ν
⊢ singularPart μ ν ≤ μ

tactic: conv_rhs => rw [h]
state_before: case pos.intro
α : Type u_1
β : Type ?u.33660
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
hl : HaveLebesgueDecomposition μ ν
left✝ : singularPart μ ν ⟂ₘ ν
h : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
⊢ singularPart μ ν ≤ μ

tactic: exact Measure.le_add_right le_rfl
state_before: case pos.intro
α : Type u_1
β : Type ?u.33660
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
hl : HaveLebesgueDecomposition μ ν
left✝ : singularPart μ ν ⟂ₘ ν
h : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
⊢ singularPart μ ν ≤ singularPart μ ν + withDensity ν (rnDeriv μ ν)

tactic: rw [singularPart, dif_neg hl]
state_before: case neg
α : Type u_1
β : Type ?u.33660
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
hl : ¬HaveLebesgueDecomposition μ ν
⊢ singularPart μ ν ≤ μ

tactic: exact Measure.zero_le μ
state_before: case neg
α : Type u_1
β : Type ?u.33660
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
hl : ¬HaveLebesgueDecomposition μ ν
⊢ 0 ≤ μ
Theorem: Fintype.card_of_finset'
File: Mathlib/Data/Fintype/Card.lean

tactic: rw [← card_ofFinset s H]
state_before: α : Type u_1
β : Type ?u.3949
γ : Type ?u.3952
p : Set α
s : Finset α
H : ∀ (x : α), x ∈ s ↔ x ∈ p
inst✝ : Fintype ↑p
⊢ card ↑p = Finset.card s

tactic: congr
state_before: α : Type u_1
β : Type ?u.3949
γ : Type ?u.3952
p : Set α
s : Finset α
H : ∀ (x : α), x ∈ s ↔ x ∈ p
inst✝ : Fintype ↑p
⊢ card ↑p = card ↑p

tactic: apply Subsingleton.elim
state_before: case h.e_2.h
α : Type u_1
β : Type ?u.3949
γ : Type ?u.3952
p : Set α
s : Finset α
H : ∀ (x : α), x ∈ s ↔ x ∈ p
inst✝ : Fintype ↑p
⊢ inst✝ = ofFinset s H
Theorem: CategoryTheory.Limits.spanExt_app_one
File: Mathlib/CategoryTheory/Limits/Shapes/Pullbacks.lean

tactic: dsimp [spanExt]
state_before: C : Type u
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
X Y Z X' Y' Z' : C
iX : X ≅ X'
iY : Y ≅ Y'
iZ : Z ≅ Z'
f : X ⟶ Y
g : X ⟶ Z
f' : X' ⟶ Y'
g' : X' ⟶ Z'
wf : iX.hom ≫ f' = f ≫ iY.hom
wg : iX.hom ≫ g' = g ≫ iZ.hom
⊢ (spanExt iX iY iZ wf wg).app WalkingSpan.zero = iX
Theorem: TensorPower.mul_one
File: Mathlib/LinearAlgebra/TensorPower.lean

tactic: rw [gMul_def, gOne_def]
state_before: R : Type u_1
M : Type u_2
inst✝² : CommSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
n : ℕ
a : (⨂[R]^n) M
⊢ ↑(cast R M (_ : n + 0 = n)) (GradedMonoid.GMul.mul a GradedMonoid.GOne.one) = a

tactic: induction' a using PiTensorProduct.induction_on with r a x y hx hy
state_before: R : Type u_1
M : Type u_2
inst✝² : CommSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
n : ℕ
a : (⨂[R]^n) M
⊢ ↑(cast R M (_ : n + 0 = n)) (↑mulEquiv (a ⊗ₜ[R] ↑(tprod R) Fin.elim0')) = a

tactic: dsimp only at a
state_before: case C1
R : Type u_1
M : Type u_2
inst✝² : CommSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
n : ℕ
r : R
a : Fin n → M
⊢ ↑(cast R M (_ : n + 0 = n)) (↑mulEquiv ((r • ↑(tprod R) a) ⊗ₜ[R] ↑(tprod R) Fin.elim0')) = r • ↑(tprod R) a

tactic: rw [← TensorProduct.smul_tmul', LinearEquiv.map_smul, LinearEquiv.map_smul, ← gMul_def,
  tprod_mul_tprod R a _, cast_tprod]
state_before: case C1
R : Type u_1
M : Type u_2
inst✝² : CommSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
n : ℕ
r : R
a : Fin n → M
⊢ ↑(cast R M (_ : n + 0 = n)) (↑mulEquiv ((r • ↑(tprod R) a) ⊗ₜ[R] ↑(tprod R) Fin.elim0')) = r • ↑(tprod R) a

tactic: congr 2 with i
state_before: case C1
R : Type u_1
M : Type u_2
inst✝² : CommSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
n : ℕ
r : R
a : Fin n → M
⊢ r • ↑(tprod R) (Fin.append a Fin.elim0' ∘ ↑(Fin.cast (_ : n = n + 0))) = r • ↑(tprod R) a

tactic: rw [Fin.append_elim0']
state_before: case C1.e_a.h.e_6.h.h
R : Type u_1
M : Type u_2
inst✝² : CommSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
n : ℕ
r : R
a : Fin n → M
i : Fin n
⊢ (Fin.append a Fin.elim0' ∘ ↑(Fin.cast (_ : n = n + 0))) i = a i

tactic: refine' congr_arg a (Fin.ext _)
state_before: case C1.e_a.h.e_6.h.h
R : Type u_1
M : Type u_2
inst✝² : CommSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
n : ℕ
r : R
a : Fin n → M
i : Fin n
⊢ ((a ∘ ↑(Fin.cast (_ : n + 0 = n))) ∘ ↑(Fin.cast (_ : n = n + 0))) i = a i

tactic: simp
state_before: case C1.e_a.h.e_6.h.h
R : Type u_1
M : Type u_2
inst✝² : CommSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
n : ℕ
r : R
a : Fin n → M
i : Fin n
⊢ ↑(↑(Fin.cast (_ : n + 0 = n)) (↑(Fin.cast (_ : n = n + 0)) i)) = ↑i

tactic: rw [TensorProduct.add_tmul, map_add, map_add, hx, hy]
state_before: case Cp
R : Type u_1
M : Type u_2
inst✝² : CommSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
n : ℕ
x y : ⨂[R] (i : Fin n), M
hx : ↑(cast R M (_ : n + 0 = n)) (↑mulEquiv (x ⊗ₜ[R] ↑(tprod R) Fin.elim0')) = x
hy : ↑(cast R M (_ : n + 0 = n)) (↑mulEquiv (y ⊗ₜ[R] ↑(tprod R) Fin.elim0')) = y
⊢ ↑(cast R M (_ : n + 0 = n)) (↑mulEquiv ((x + y) ⊗ₜ[R] ↑(tprod R) Fin.elim0')) = x + y
Theorem: vieta_formula_quadratic
File: Mathlib/Algebra/Ring/Basic.lean

tactic: have : c = x * (b - x) := (eq_neg_of_add_eq_zero_right h).trans (by simp [mul_sub, mul_comm])
state_before: α : Type u_1
inst✝ : NonUnitalCommRing α
a b✝ c✝ b c x : α
h : x * x - b * x + c = 0
⊢ ∃ y, y * y - b * y + c = 0 ∧ x + y = b ∧ x * y = c

tactic: refine' ⟨b - x, _, by simp, by rw [this]⟩
state_before: α : Type u_1
inst✝ : NonUnitalCommRing α
a b✝ c✝ b c x : α
h : x * x - b * x + c = 0
this : c = x * (b - x)
⊢ ∃ y, y * y - b * y + c = 0 ∧ x + y = b ∧ x * y = c

tactic: rw [this, sub_add, ← sub_mul, sub_self]
state_before: α : Type u_1
inst✝ : NonUnitalCommRing α
a b✝ c✝ b c x : α
h : x * x - b * x + c = 0
this : c = x * (b - x)
⊢ (b - x) * (b - x) - b * (b - x) + c = 0

tactic: simp [mul_sub, mul_comm]
state_before: α : Type u_1
inst✝ : NonUnitalCommRing α
a b✝ c✝ b c x : α
h : x * x - b * x + c = 0
⊢ -(x * x - b * x) = x * (b - x)

tactic: simp
state_before: α : Type u_1
inst✝ : NonUnitalCommRing α
a b✝ c✝ b c x : α
h : x * x - b * x + c = 0
this : c = x * (b - x)
⊢ x + (b - x) = b

tactic: rw [this]
state_before: α : Type u_1
inst✝ : NonUnitalCommRing α
a b✝ c✝ b c x : α
h : x * x - b * x + c = 0
this : c = x * (b - x)
⊢ x * (b - x) = c
Theorem: Part.sdiff_get_eq
File: Mathlib/Data/Part.lean

tactic: simp [sdiff_def]
state_before: α : Type u_1
β : Type ?u.102138
γ : Type ?u.102141
inst✝ : SDiff α
a b : Part α
hab : (a \ b).Dom
⊢ get (a \ b) hab = get a (_ : a.Dom) \ get b (_ : b.Dom)

tactic: aesop
state_before: α : Type u_1
β : Type ?u.102138
γ : Type ?u.102141
inst✝ : SDiff α
a b : Part α
hab : (a \ b).Dom
⊢ get (Part.bind a fun y => map (fun x => y \ x) b) (_ : (Part.bind a fun y => map (fun x => y \ x) b).Dom) =
    get a (_ : a.Dom) \ get b (_ : b.Dom)