tasksource/leandojo huggingface dataset:
Theorem: Std.PairingHeapImp.Heap.noSibling_merge
File: Std/Data/PairingHeap.lean

tactic: unfold merge
state_before: α : Type u_1
le : α → α → Bool
s₁ s₂ : Heap α
⊢ NoSibling (merge le s₁ s₂)

tactic: (split <;> try split) <;> constructor
state_before: α : Type u_1
le : α → α → Bool
s₁ s₂ : Heap α
⊢ NoSibling
    (match s₁, s₂ with
    | nil, nil => nil
    | nil, node a₂ c₂ sibling => node a₂ c₂ nil
    | node a₁ c₁ sibling, nil => node a₁ c₁ nil
    | node a₁ c₁ sibling, node a₂ c₂ sibling_1 =>
      if le a₁ a₂ = true then node a₁ (node a₂ c₂ c₁) nil else node a₂ (node a₁ c₁ c₂) nil)

tactic: split <;> try split
state_before: α : Type u_1
le : α → α → Bool
s₁ s₂ : Heap α
⊢ NoSibling
    (match s₁, s₂ with
    | nil, nil => nil
    | nil, node a₂ c₂ sibling => node a₂ c₂ nil
    | node a₁ c₁ sibling, nil => node a₁ c₁ nil
    | node a₁ c₁ sibling, node a₂ c₂ sibling_1 =>
      if le a₁ a₂ = true then node a₁ (node a₂ c₂ c₁) nil else node a₂ (node a₁ c₁ c₂) nil)

tactic: split
state_before: case h_4
α : Type u_1
le : α → α → Bool
x✝¹ x✝ : Heap α
a₁✝ : α
c₁✝ sibling✝¹ : Heap α
a₂✝ : α
c₂✝ sibling✝ : Heap α
⊢ NoSibling (if le a₁✝ a₂✝ = true then node a₁✝ (node a₂✝ c₂✝ c₁✝) nil else node a₂✝ (node a₁✝ c₁✝ c₂✝) nil)
Theorem: symmDiff_sdiff_eq_sup
File: Mathlib/Order/SymmDiff.lean

tactic: rw [symmDiff, sdiff_idem]
state_before: ι : Type ?u.32022
α : Type u_1
β : Type ?u.32028
π : ι → Type ?u.32033
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ a ∆ (b \ a) = a ⊔ b

tactic: exact
  le_antisymm (sup_le_sup sdiff_le sdiff_le)
    (sup_le le_sdiff_sup <| le_sdiff_sup.trans <| sup_le le_sup_right le_sdiff_sup)
state_before: ι : Type ?u.32022
α : Type u_1
β : Type ?u.32028
π : ι → Type ?u.32033
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ a \ (b \ a) ⊔ b \ a = a ⊔ b
Theorem: Polynomial.coeff_zero_eq_aeval_zero
File: Mathlib/Data/Polynomial/AlgebraMap.lean

tactic: simp [coeff_zero_eq_eval_zero]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
A' : Type ?u.1112049
B' : Type ?u.1112052
a b : R
n : ℕ
inst✝⁶ : CommSemiring A'
inst✝⁵ : Semiring B'
inst✝⁴ : CommSemiring R
p✝ q : R[X]
inst✝³ : Semiring A
inst✝² : Algebra R A
B : Type ?u.1112265
inst✝¹ : Semiring B
inst✝ : Algebra R B
x : A
p : R[X]
⊢ coeff p 0 = ↑(aeval 0) p
Theorem: monotone_iff_map_nonneg
File: Mathlib/Algebra/Order/Hom/Monoid.lean

tactic: rw [← map_zero f]
state_before: F : Type u_3
α : Type u_1
β : Type u_2
γ : Type ?u.37806
δ : Type ?u.37809
inst✝² : OrderedAddCommGroup α
inst✝¹ : OrderedAddCommMonoid β
inst✝ : AddMonoidHomClass F α β
f : F
h : Monotone ↑f
a : α
⊢ 0 ≤ a → 0 ≤ ↑f a

tactic: apply h
state_before: F : Type u_3
α : Type u_1
β : Type u_2
γ : Type ?u.37806
δ : Type ?u.37809
inst✝² : OrderedAddCommGroup α
inst✝¹ : OrderedAddCommMonoid β
inst✝ : AddMonoidHomClass F α β
f : F
h : Monotone ↑f
a : α
⊢ 0 ≤ a → ↑f 0 ≤ ↑f a

tactic: rw [← sub_add_cancel b a, map_add f]
state_before: F : Type u_3
α : Type u_1
β : Type u_2
γ : Type ?u.37806
δ : Type ?u.37809
inst✝² : OrderedAddCommGroup α
inst✝¹ : OrderedAddCommMonoid β
inst✝ : AddMonoidHomClass F α β
f : F
h : ∀ (a : α), 0 ≤ a → 0 ≤ ↑f a
a b : α
hl : a ≤ b
⊢ ↑f a ≤ ↑f b

tactic: exact le_add_of_nonneg_left (h _ <| sub_nonneg.2 hl)
state_before: F : Type u_3
α : Type u_1
β : Type u_2
γ : Type ?u.37806
δ : Type ?u.37809
inst✝² : OrderedAddCommGroup α
inst✝¹ : OrderedAddCommMonoid β
inst✝ : AddMonoidHomClass F α β
f : F
h : ∀ (a : α), 0 ≤ a → 0 ≤ ↑f a
a b : α
hl : a ≤ b
⊢ ↑f a ≤ ↑f (b - a) + ↑f a
Theorem: Decidable.or_iff_not_and_not
File: Std/Logic.lean

tactic: rw [← not_or, not_not]
state_before: a b : Prop
inst✝¹ : Decidable a
inst✝ : Decidable b
⊢ a ∨ b ↔ ¬(¬a ∧ ¬b)
Theorem: Set.iUnion_prod_of_monotone
File: Mathlib/Data/Set/Lattice.lean

tactic: ext ⟨z, w⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort ?u.237166
ι' : Sort ?u.237169
ι₂ : Sort ?u.237172
κ : ι → Sort ?u.237177
κ₁ : ι → Sort ?u.237182
κ₂ : ι → Sort ?u.237187
κ' : ι' → Sort ?u.237192
inst✝ : SemilatticeSup α
s : α → Set β
t : α → Set γ
hs : Monotone s
ht : Monotone t
⊢ (⋃ (x : α), s x ×ˢ t x) = (⋃ (x : α), s x) ×ˢ ⋃ (x : α), t x

tactic: simp only [mem_prod, mem_iUnion, exists_imp, and_imp, iff_def]
state_before: case h.mk
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort ?u.237166
ι' : Sort ?u.237169
ι₂ : Sort ?u.237172
κ : ι → Sort ?u.237177
κ₁ : ι → Sort ?u.237182
κ₂ : ι → Sort ?u.237187
κ' : ι' → Sort ?u.237192
inst✝ : SemilatticeSup α
s : α → Set β
t : α → Set γ
hs : Monotone s
ht : Monotone t
z : β
w : γ
⊢ ((z, w) ∈ ⋃ (x : α), s x ×ˢ t x) ↔ (z, w) ∈ (⋃ (x : α), s x) ×ˢ ⋃ (x : α), t x

tactic: constructor
state_before: case h.mk
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort ?u.237166
ι' : Sort ?u.237169
ι₂ : Sort ?u.237172
κ : ι → Sort ?u.237177
κ₁ : ι → Sort ?u.237182
κ₂ : ι → Sort ?u.237187
κ' : ι' → Sort ?u.237192
inst✝ : SemilatticeSup α
s : α → Set β
t : α → Set γ
hs : Monotone s
ht : Monotone t
z : β
w : γ
⊢ (∀ (x : α), z ∈ s x → w ∈ t x → (∃ i, z ∈ s i) ∧ ∃ i, w ∈ t i) ∧
    ∀ (x : α), z ∈ s x → ∀ (x : α), w ∈ t x → ∃ i, z ∈ s i ∧ w ∈ t i

tactic: intro x hz hw
state_before: case h.mk.left
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort ?u.237166
ι' : Sort ?u.237169
ι₂ : Sort ?u.237172
κ : ι → Sort ?u.237177
κ₁ : ι → Sort ?u.237182
κ₂ : ι → Sort ?u.237187
κ' : ι' → Sort ?u.237192
inst✝ : SemilatticeSup α
s : α → Set β
t : α → Set γ
hs : Monotone s
ht : Monotone t
z : β
w : γ
⊢ ∀ (x : α), z ∈ s x → w ∈ t x → (∃ i, z ∈ s i) ∧ ∃ i, w ∈ t i

tactic: exact ⟨⟨x, hz⟩, x, hw⟩
state_before: case h.mk.left
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort ?u.237166
ι' : Sort ?u.237169
ι₂ : Sort ?u.237172
κ : ι → Sort ?u.237177
κ₁ : ι → Sort ?u.237182
κ₂ : ι → Sort ?u.237187
κ' : ι' → Sort ?u.237192
inst✝ : SemilatticeSup α
s : α → Set β
t : α → Set γ
hs : Monotone s
ht : Monotone t
z : β
w : γ
x : α
hz : z ∈ s x
hw : w ∈ t x
⊢ (∃ i, z ∈ s i) ∧ ∃ i, w ∈ t i

tactic: intro x hz x' hw
state_before: case h.mk.right
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort ?u.237166
ι' : Sort ?u.237169
ι₂ : Sort ?u.237172
κ : ι → Sort ?u.237177
κ₁ : ι → Sort ?u.237182
κ₂ : ι → Sort ?u.237187
κ' : ι' → Sort ?u.237192
inst✝ : SemilatticeSup α
s : α → Set β
t : α → Set γ
hs : Monotone s
ht : Monotone t
z : β
w : γ
⊢ ∀ (x : α), z ∈ s x → ∀ (x : α), w ∈ t x → ∃ i, z ∈ s i ∧ w ∈ t i

tactic: exact ⟨x ⊔ x', hs le_sup_left hz, ht le_sup_right hw⟩
state_before: case h.mk.right
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort ?u.237166
ι' : Sort ?u.237169
ι₂ : Sort ?u.237172
κ : ι → Sort ?u.237177
κ₁ : ι → Sort ?u.237182
κ₂ : ι → Sort ?u.237187
κ' : ι' → Sort ?u.237192
inst✝ : SemilatticeSup α
s : α → Set β
t : α → Set γ
hs : Monotone s
ht : Monotone t
z : β
w : γ
x : α
hz : z ∈ s x
x' : α
hw : w ∈ t x'
⊢ ∃ i, z ∈ s i ∧ w ∈ t i
Theorem: real_inner_div_norm_mul_norm_eq_neg_one_of_ne_zero_of_neg_mul
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: rw [real_inner_smul_self_right, norm_smul, Real.norm_eq_abs, ← mul_assoc ‖x‖, mul_comm _ (|r|),
  mul_assoc, abs_of_neg hr, neg_mul, div_neg_eq_neg_div, div_self]
state_before: 𝕜 : Type ?u.3160254
E : Type ?u.3160257
F : Type u_1
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x : F
r : ℝ
hx : x ≠ 0
hr : r < 0
⊢ inner x (r • x) / (‖x‖ * ‖r • x‖) = -1

tactic: exact mul_ne_zero hr.ne (mul_self_ne_zero.2 (norm_ne_zero_iff.2 hx))
state_before: 𝕜 : Type ?u.3160254
E : Type ?u.3160257
F : Type u_1
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x : F
r : ℝ
hx : x ≠ 0
hr : r < 0
⊢ r * (‖x‖ * ‖x‖) ≠ 0
Theorem: Cardinal.cast_toNat_of_aleph0_le
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: rw [toNat_apply_of_aleph0_le h, Nat.cast_zero]
state_before: α β : Type u
c : Cardinal
h : ℵ₀ ≤ c
⊢ ↑(↑toNat c) = 0
Theorem: wbtw_smul_vadd_smul_vadd_of_nonneg_of_le
File: Mathlib/Analysis/Convex/Between.lean

tactic: refine' ⟨r₁ / r₂, ⟨div_nonneg hr₁ (hr₁.trans hr₂), div_le_one_of_le hr₂ (hr₁.trans hr₂)⟩, _⟩
state_before: R : Type u_1
V : Type u_2
V' : Type ?u.518717
P : Type u_3
P' : Type ?u.518723
inst✝³ : LinearOrderedField R
inst✝² : AddCommGroup V
inst✝¹ : Module R V
inst✝ : AddTorsor V P
x : P
v : V
r₁ r₂ : R
hr₁ : 0 ≤ r₁
hr₂ : r₁ ≤ r₂
⊢ Wbtw R x (r₁ • v +ᵥ x) (r₂ • v +ᵥ x)

tactic: by_cases h : r₁ = 0
state_before: R : Type u_1
V : Type u_2
V' : Type ?u.518717
P : Type u_3
P' : Type ?u.518723
inst✝³ : LinearOrderedField R
inst✝² : AddCommGroup V
inst✝¹ : Module R V
inst✝ : AddTorsor V P
x : P
v : V
r₁ r₂ : R
hr₁ : 0 ≤ r₁
hr₂ : r₁ ≤ r₂
⊢ ↑(lineMap x (r₂ • v +ᵥ x)) (r₁ / r₂) = r₁ • v +ᵥ x

tactic: simp [lineMap_apply, smul_smul, ((hr₁.lt_of_ne' h).trans_le hr₂).ne.symm]
state_before: case neg
R : Type u_1
V : Type u_2
V' : Type ?u.518717
P : Type u_3
P' : Type ?u.518723
inst✝³ : LinearOrderedField R
inst✝² : AddCommGroup V
inst✝¹ : Module R V
inst✝ : AddTorsor V P
x : P
v : V
r₁ r₂ : R
hr₁ : 0 ≤ r₁
hr₂ : r₁ ≤ r₂
h : ¬r₁ = 0
⊢ ↑(lineMap x (r₂ • v +ᵥ x)) (r₁ / r₂) = r₁ • v +ᵥ x

tactic: simp [h]
state_before: case pos
R : Type u_1
V : Type u_2
V' : Type ?u.518717
P : Type u_3
P' : Type ?u.518723
inst✝³ : LinearOrderedField R
inst✝² : AddCommGroup V
inst✝¹ : Module R V
inst✝ : AddTorsor V P
x : P
v : V
r₁ r₂ : R
hr₁ : 0 ≤ r₁
hr₂ : r₁ ≤ r₂
h : r₁ = 0
⊢ ↑(lineMap x (r₂ • v +ᵥ x)) (r₁ / r₂) = r₁ • v +ᵥ x
Theorem: DihedralGroup.card
File: Mathlib/GroupTheory/SpecificGroups/Dihedral.lean

tactic: rw [← Fintype.card_eq.mpr ⟨fintypeHelper⟩, Fintype.card_sum, ZMod.card, two_mul]
state_before: n : ℕ
inst✝ : NeZero n
⊢ Fintype.card (DihedralGroup n) = 2 * n
Theorem: List.stronglyMeasurable_prod
File: Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean

tactic: simpa only [← Pi.list_prod_apply] using l.stronglyMeasurable_prod' hl
state_before: α : Type u_1
β : Type ?u.113287
γ : Type ?u.113290
ι : Type ?u.113293
inst✝³ : Countable ι
f g : α → β
M : Type u_2
inst✝² : Monoid M
inst✝¹ : TopologicalSpace M
inst✝ : ContinuousMul M
m : MeasurableSpace α
l : List (α → M)
hl : ∀ (f : α → M), f ∈ l → StronglyMeasurable f
⊢ StronglyMeasurable fun x => List.prod (List.map (fun f => f x) l)
Theorem: Nat.dist_eq_sub_of_le_right
File: Mathlib/Data/Nat/Dist.lean

tactic: rw [dist_comm]
state_before: n m : ℕ
h : m ≤ n
⊢ dist n m = n - m

tactic: apply dist_eq_sub_of_le h
state_before: n m : ℕ
h : m ≤ n
⊢ dist m n = n - m
Theorem: Submonoid.LocalizationMap.map_mul_left
File: Mathlib/GroupTheory/MonoidLocalization.lean

tactic: rw [mul_comm, f.map_mul_right]
state_before: M : Type u_2
inst✝³ : CommMonoid M
S : Submonoid M
N : Type u_4
inst✝² : CommMonoid N
P : Type u_3
inst✝¹ : CommMonoid P
f : LocalizationMap S N
g : M →* P
hg : ∀ (y : { x // x ∈ S }), IsUnit (↑g ↑y)
T : Submonoid P
hy : ∀ (y : { x // x ∈ S }), ↑g ↑y ∈ T
Q : Type u_1
inst✝ : CommMonoid Q
k : LocalizationMap T Q
z : N
⊢ ↑(toMap k) (↑g ↑(sec f z).snd) * ↑(map f hy k) z = ↑(toMap k) (↑g (sec f z).fst)
Theorem: ENNReal.rpow_one_div_le_iff
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

tactic: nth_rw 1 [← ENNReal.rpow_one y]
state_before: x y : ℝ≥0∞
z : ℝ
hz : 0 < z
⊢ x ^ (1 / z) ≤ y ↔ x ≤ y ^ z

tactic: nth_rw 2 [← @_root_.mul_inv_cancel _ _ z hz.ne.symm]
state_before: x y : ℝ≥0∞
z : ℝ
hz : 0 < z
⊢ x ^ (1 / z) ≤ y ^ 1 ↔ x ≤ y ^ z

tactic: rw [ENNReal.rpow_mul, ← one_div, ENNReal.rpow_le_rpow_iff (one_div_pos.2 hz)]
state_before: x y : ℝ≥0∞
z : ℝ
hz : 0 < z
⊢ x ^ (1 / z) ≤ y ^ (z * z⁻¹) ↔ x ≤ y ^ z
Theorem: PadicInt.nthHom_zero
File: Mathlib/NumberTheory/Padics/RingHoms.lean

tactic: simp [nthHom]
state_before: p : ℕ
hp_prime : Fact (Nat.Prime p)
R : Type u_1
inst✝ : NonAssocSemiring R
f : (k : ℕ) → R →+* ZMod (p ^ k)
f_compat : ∀ (k1 k2 : ℕ) (hk : k1 ≤ k2), RingHom.comp (ZMod.castHom (_ : p ^ k1 ∣ p ^ k2) (ZMod (p ^ k1))) (f k2) = f k1
⊢ nthHom f 0 = 0

tactic: rfl
state_before: p : ℕ
hp_prime : Fact (Nat.Prime p)
R : Type u_1
inst✝ : NonAssocSemiring R
f : (k : ℕ) → R →+* ZMod (p ^ k)
f_compat : ∀ (k1 k2 : ℕ) (hk : k1 ≤ k2), RingHom.comp (ZMod.castHom (_ : p ^ k1 ∣ p ^ k2) (ZMod (p ^ k1))) (f k2) = f k1
⊢ (fun n => 0) = 0
Theorem: Polynomial.divByMonic_eq_div
File: Mathlib/Data/Polynomial/FieldDivision.lean

tactic: simp only [Monic.def.1 hq, inv_one, C_1, one_mul, mul_one]
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Field R
p✝ q p : R[X]
hq : Monic q
⊢ p /ₘ q = ↑C (leadingCoeff q)⁻¹ * (p /ₘ (q * ↑C (leadingCoeff q)⁻¹))
Theorem: Real.cosh_sub_sinh
File: Mathlib/Data/Complex/Exponential.lean

tactic: rw [← ofReal_inj]
state_before: x y : ℝ
⊢ cosh x - sinh x = exp (-x)

tactic: simp
state_before: x y : ℝ
⊢ ↑(cosh x - sinh x) = ↑(exp (-x))
Theorem: Polynomial.nthRoots_zero
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: simp only [empty_eq_zero, pow_zero, nthRoots, ← C_1, ← C_sub, roots_C]
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
r : R
⊢ nthRoots 0 r = 0
Theorem: MeasureTheory.lintegral_indicator_const
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: rw [lintegral_indicator _ hs, set_lintegral_const]
state_before: α : Type u_1
β : Type ?u.952854
γ : Type ?u.952857
δ : Type ?u.952860
m : MeasurableSpace α
μ ν : Measure α
s : Set α
hs : MeasurableSet s
c : ℝ≥0∞
⊢ (∫⁻ (a : α), indicator s (fun x => c) a ∂μ) = c * ↑↑μ s
Theorem: multiplicity.multiplicity_lt_iff_neg_dvd
File: Mathlib/RingTheory/Multiplicity.lean

tactic: rw [pow_dvd_iff_le_multiplicity, not_le]
state_before: α : Type u_1
inst✝¹ : Monoid α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
k : ℕ
⊢ multiplicity a b < ↑k ↔ ¬a ^ k ∣ b
Theorem: Std.RBNode.Ordered.mem_find?
File: Std/Data/RBMap/Lemmas.lean

tactic: refine ⟨fun h => ⟨find?_some_mem h, find?_some_eq_eq h⟩, fun ⟨hx, e⟩ => ?_⟩
state_before: α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
t : RBNode α
x : α
inst✝¹ : TransCmp cmp
inst✝ : IsStrictCut cmp cut
ht : Ordered cmp t
⊢ x ∈ find? cut t ↔ x ∈ t ∧ cut x = Ordering.eq

tactic: have ⟨y, hy⟩ := ht.memP_iff_find?.1 (memP_def.2 ⟨_, hx, e⟩)
state_before: α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
t : RBNode α
x : α
inst✝¹ : TransCmp cmp
inst✝ : IsStrictCut cmp cut
ht : Ordered cmp t
x✝ : x ∈ t ∧ cut x = Ordering.eq
hx : x ∈ t
e : cut x = Ordering.eq
⊢ x ∈ find? cut t

tactic: exact ht.unique hx (find?_some_mem hy) ((IsStrictCut.exact e).trans (find?_some_eq_eq hy)) ▸ hy
state_before: α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
t : RBNode α
x : α
inst✝¹ : TransCmp cmp
inst✝ : IsStrictCut cmp cut
ht : Ordered cmp t
x✝ : x ∈ t ∧ cut x = Ordering.eq
hx : x ∈ t
e : cut x = Ordering.eq
y : α
hy : y ∈ find? cut t
⊢ x ∈ find? cut t
Theorem: Polynomial.leadingCoeff_divByMonic_X_sub_C
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: nontriviality
state_before: R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
hp : degree p ≠ 0
a : R
⊢ leadingCoeff (p /ₘ (X - ↑C a)) = leadingCoeff p

tactic: cases' hp.lt_or_lt with hd hd
state_before: R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝² : CommRing R
inst✝¹ : IsDomain R
p✝ q p : R[X]
hp : degree p ≠ 0
a : R
inst✝ : Nontrivial R
⊢ leadingCoeff (p /ₘ (X - ↑C a)) = leadingCoeff p

tactic: refine' leadingCoeff_divByMonic_of_monic (monic_X_sub_C a) _
state_before: case inr
R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝² : CommRing R
inst✝¹ : IsDomain R
p✝ q p : R[X]
hp : degree p ≠ 0
a : R
inst✝ : Nontrivial R
hd : 0 < degree p
⊢ leadingCoeff (p /ₘ (X - ↑C a)) = leadingCoeff p

tactic: rwa [degree_X_sub_C, Nat.WithBot.one_le_iff_zero_lt]
state_before: case inr
R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝² : CommRing R
inst✝¹ : IsDomain R
p✝ q p : R[X]
hp : degree p ≠ 0
a : R
inst✝ : Nontrivial R
hd : 0 < degree p
⊢ degree (X - ↑C a) ≤ degree p

tactic: rw [degree_eq_bot.mp <| (Nat.WithBot.lt_zero_iff _).mp hd, zero_divByMonic]
state_before: case inl
R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝² : CommRing R
inst✝¹ : IsDomain R
p✝ q p : R[X]
hp : degree p ≠ 0
a : R
inst✝ : Nontrivial R
hd : degree p < 0
⊢ leadingCoeff (p /ₘ (X - ↑C a)) = leadingCoeff p
Theorem: Set.Finite.absorbs_iUnion
File: Mathlib/Analysis/LocallyConvex/Basic.lean

tactic: lift t to Finset ι using hi
state_before: 𝕜 : Type u_3
𝕝 : Type ?u.5168
E : Type u_2
ι✝ : Sort ?u.5174
κ : ι✝ → Sort ?u.5179
inst✝¹ : SeminormedRing 𝕜
inst✝ : SMul 𝕜 E
s✝ t✝ u v A B : Set E
ι : Type u_1
s : Set E
t : Set ι
f : ι → Set E
hi : Set.Finite t
⊢ Absorbs 𝕜 s (⋃ (i : ι) (_ : i ∈ t), f i) ↔ ∀ (i : ι), i ∈ t → Absorbs 𝕜 s (f i)

tactic: simp only [Finset.mem_coe]
state_before: case intro
𝕜 : Type u_3
𝕝 : Type ?u.5168
E : Type u_2
ι✝ : Sort ?u.5174
κ : ι✝ → Sort ?u.5179
inst✝¹ : SeminormedRing 𝕜
inst✝ : SMul 𝕜 E
s✝ t✝ u v A B : Set E
ι : Type u_1
s : Set E
f : ι → Set E
t : Finset ι
⊢ Absorbs 𝕜 s (⋃ (i : ι) (_ : i ∈ ↑t), f i) ↔ ∀ (i : ι), i ∈ ↑t → Absorbs 𝕜 s (f i)

tactic: exact absorbs_iUnion_finset
state_before: case intro
𝕜 : Type u_3
𝕝 : Type ?u.5168
E : Type u_2
ι✝ : Sort ?u.5174
κ : ι✝ → Sort ?u.5179
inst✝¹ : SeminormedRing 𝕜
inst✝ : SMul 𝕜 E
s✝ t✝ u v A B : Set E
ι : Type u_1
s : Set E
f : ι → Set E
t : Finset ι
⊢ Absorbs 𝕜 s (⋃ (i : ι) (_ : i ∈ t), f i) ↔ ∀ (i : ι), i ∈ t → Absorbs 𝕜 s (f i)
Theorem: Complex.abs_exp_ofReal
File: Mathlib/Data/Complex/Exponential.lean

tactic: rw [← ofReal_exp]
state_before: x : ℝ
⊢ ↑abs (exp ↑x) = Real.exp x

tactic: exact abs_of_nonneg (le_of_lt (Real.exp_pos _))
state_before: x : ℝ
⊢ ↑abs ↑(Real.exp x) = Real.exp x
Theorem: Filter.Eventually.diag_of_prod_left
File: Mathlib/Order/Filter/Prod.lean

tactic: intro h
state_before: α : Type u_1
β : Type ?u.9875
γ : Type u_2
δ : Type ?u.9881
ι : Sort ?u.9884
s : Set α
t : Set β
f✝ : Filter α
g✝ : Filter β
f : Filter α
g : Filter γ
p : (α × α) × γ → Prop
⊢ (∀ᶠ (x : (α × α) × γ) in (f ×ˢ f) ×ˢ g, p x) → ∀ᶠ (x : α × γ) in f ×ˢ g, p ((x.fst, x.fst), x.snd)

tactic: obtain ⟨t, ht, s, hs, hst⟩ := eventually_prod_iff.1 h
state_before: α : Type u_1
β : Type ?u.9875
γ : Type u_2
δ : Type ?u.9881
ι : Sort ?u.9884
s : Set α
t : Set β
f✝ : Filter α
g✝ : Filter β
f : Filter α
g : Filter γ
p : (α × α) × γ → Prop
h : ∀ᶠ (x : (α × α) × γ) in (f ×ˢ f) ×ˢ g, p x
⊢ ∀ᶠ (x : α × γ) in f ×ˢ g, p ((x.fst, x.fst), x.snd)

tactic: refine' (ht.diag_of_prod.prod_mk hs).mono fun x hx => by simp only [hst hx.1 hx.2, Prod.mk.eta]
state_before: case intro.intro.intro.intro
α : Type u_1
β : Type ?u.9875
γ : Type u_2
δ : Type ?u.9881
ι : Sort ?u.9884
s✝ : Set α
t✝ : Set β
f✝ : Filter α
g✝ : Filter β
f : Filter α
g : Filter γ
p : (α × α) × γ → Prop
h : ∀ᶠ (x : (α × α) × γ) in (f ×ˢ f) ×ˢ g, p x
t : α × α → Prop
ht : ∀ᶠ (x : α × α) in f ×ˢ f, t x
s : γ → Prop
hs : ∀ᶠ (y : γ) in g, s y
hst : ∀ {x : α × α}, t x → ∀ {y : γ}, s y → p (x, y)
⊢ ∀ᶠ (x : α × γ) in f ×ˢ g, p ((x.fst, x.fst), x.snd)

tactic: simp only [hst hx.1 hx.2, Prod.mk.eta]
state_before: α : Type u_1
β : Type ?u.9875
γ : Type u_2
δ : Type ?u.9881
ι : Sort ?u.9884
s✝ : Set α
t✝ : Set β
f✝ : Filter α
g✝ : Filter β
f : Filter α
g : Filter γ
p : (α × α) × γ → Prop
h : ∀ᶠ (x : (α × α) × γ) in (f ×ˢ f) ×ˢ g, p x
t : α × α → Prop
ht : ∀ᶠ (x : α × α) in f ×ˢ f, t x
s : γ → Prop
hs : ∀ᶠ (y : γ) in g, s y
hst : ∀ {x : α × α}, t x → ∀ {y : γ}, s y → p (x, y)
x : α × γ
hx : t (x.fst, x.fst) ∧ s x.snd
⊢ p ((x.fst, x.fst), x.snd)
Theorem: Nat.factorization_eq_zero_iff
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: rw [← not_mem_support_iff, support_factorization, mem_toFinset]
state_before: n p : ℕ
⊢ ↑(factorization n) p = 0 ↔ ¬Prime p ∨ ¬p ∣ n ∨ n = 0

tactic: rcases eq_or_ne n 0 with (rfl | hn)
state_before: n p : ℕ
⊢ ¬p ∈ factors n ↔ ¬Prime p ∨ ¬p ∣ n ∨ n = 0

tactic: simp
state_before: case inl
p : ℕ
⊢ ¬p ∈ factors 0 ↔ ¬Prime p ∨ ¬p ∣ 0 ∨ 0 = 0

tactic: simp [hn, Nat.mem_factors, not_and_or, -not_and]
state_before: case inr
n p : ℕ
hn : n ≠ 0
⊢ ¬p ∈ factors n ↔ ¬Prime p ∨ ¬p ∣ n ∨ n = 0
Theorem: Nat.ppred_eq_none
File: Mathlib/Data/Nat/PSub.lean

tactic: simp
state_before: ⊢ ppred 0 = none ↔ 0 = 0

tactic: constructor <;> intro <;> contradiction
state_before: n : ℕ
⊢ ppred (n + 1) = none ↔ n + 1 = 0
Theorem: FractionalIdeal.one_mem_inv_coe_ideal
File: Mathlib/RingTheory/DedekindDomain/Ideal.lean

tactic: rw [mem_inv_iff (coeIdeal_ne_zero.mpr hI)]
state_before: R : Type ?u.275932
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Field K
inst✝² : IsDomain A
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
I : Ideal A
hI : I ≠ ⊥
⊢ 1 ∈ (↑I)⁻¹

tactic: intro y hy
state_before: R : Type ?u.275932
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Field K
inst✝² : IsDomain A
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
I : Ideal A
hI : I ≠ ⊥
⊢ ∀ (y : K), y ∈ ↑I → 1 * y ∈ 1

tactic: rw [one_mul]
state_before: R : Type ?u.275932
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Field K
inst✝² : IsDomain A
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
I : Ideal A
hI : I ≠ ⊥
y : K
hy : y ∈ ↑I
⊢ 1 * y ∈ 1

tactic: exact coeIdeal_le_one hy
state_before: R : Type ?u.275932
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Field K
inst✝² : IsDomain A
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
I : Ideal A
hI : I ≠ ⊥
y : K
hy : y ∈ ↑I
⊢ y ∈ 1
Theorem: MeasureTheory.L1.norm_sub_eq_lintegral
File: Mathlib/MeasureTheory/Function/L1Space.lean

tactic: rw [norm_def]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.1303508
δ : Type ?u.1303511
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f g : { x // x ∈ Lp β 1 }
⊢ ‖f - g‖ = ENNReal.toReal (∫⁻ (x : α), ↑‖↑↑f x - ↑↑g x‖₊ ∂μ)

tactic: congr 1
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.1303508
δ : Type ?u.1303511
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f g : { x // x ∈ Lp β 1 }
⊢ ENNReal.toReal (∫⁻ (a : α), ↑‖↑↑(f - g) a‖₊ ∂μ) = ENNReal.toReal (∫⁻ (x : α), ↑‖↑↑f x - ↑↑g x‖₊ ∂μ)

tactic: rw [lintegral_congr_ae]
state_before: case e_a
α : Type u_1
β : Type u_2
γ : Type ?u.1303508
δ : Type ?u.1303511
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f g : { x // x ∈ Lp β 1 }
⊢ (∫⁻ (a : α), ↑‖↑↑(f - g) a‖₊ ∂μ) = ∫⁻ (x : α), ↑‖↑↑f x - ↑↑g x‖₊ ∂μ

tactic: filter_upwards [Lp.coeFn_sub f g] with _ ha
state_before: case e_a
α : Type u_1
β : Type u_2
γ : Type ?u.1303508
δ : Type ?u.1303511
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f g : { x // x ∈ Lp β 1 }
⊢ (fun a => ↑‖↑↑(f - g) a‖₊) =ᵐ[μ] fun a => ↑‖↑↑f a - ↑↑g a‖₊

tactic: simp only [ha, Pi.sub_apply]
state_before: case h
α : Type u_1
β : Type u_2
γ : Type ?u.1303508
δ : Type ?u.1303511
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f g : { x // x ∈ Lp β 1 }
a✝ : α
ha : ↑↑(f - g) a✝ = (↑↑f - ↑↑g) a✝
⊢ ↑‖↑↑(f - g) a✝‖₊ = ↑‖↑↑f a✝ - ↑↑g a✝‖₊
Theorem: Metric.diam_triple
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: simp only [Metric.diam, EMetric.diam_triple, dist_edist]
state_before: α : Type u
β : Type v
X : Type ?u.529537
ι : Type ?u.529540
inst✝ : PseudoMetricSpace α
s : Set α
x y z : α
⊢ diam {x, y, z} = max (max (dist x y) (dist x z)) (dist y z)

tactic: rw [ENNReal.toReal_max, ENNReal.toReal_max] <;> apply_rules [ne_of_lt, edist_lt_top, max_lt]
state_before: α : Type u
β : Type v
X : Type ?u.529537
ι : Type ?u.529540
inst✝ : PseudoMetricSpace α
s : Set α
x y z : α
⊢ ENNReal.toReal (max (max (edist x y) (edist x z)) (edist y z)) =
    max (max (ENNReal.toReal (edist x y)) (ENNReal.toReal (edist x z))) (ENNReal.toReal (edist y z))