tasksource/leandojo huggingface dataset:
Theorem: hyperoperation_zero
File: Mathlib/Data/Nat/Hyperoperation.lean

tactic: rw [hyperoperation, Nat.succ_eq_add_one]
state_before: m k : ℕ
⊢ hyperoperation 0 m k = Nat.succ k
Theorem: Real.rpow_le_rpow_of_exponent_ge
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: repeat' rw [rpow_def_of_pos hx0]
state_before: x y z : ℝ
hx0 : 0 < x
hx1 : x ≤ 1
hyz : z ≤ y
⊢ x ^ y ≤ x ^ z

tactic: rw [exp_le_exp]
state_before: x y z : ℝ
hx0 : 0 < x
hx1 : x ≤ 1
hyz : z ≤ y
⊢ exp (log x * y) ≤ exp (log x * z)

tactic: exact mul_le_mul_of_nonpos_left hyz (log_nonpos (le_of_lt hx0) hx1)
state_before: x y z : ℝ
hx0 : 0 < x
hx1 : x ≤ 1
hyz : z ≤ y
⊢ log x * y ≤ log x * z

tactic: rw [rpow_def_of_pos hx0]
state_before: x y z : ℝ
hx0 : 0 < x
hx1 : x ≤ 1
hyz : z ≤ y
⊢ exp (log x * y) ≤ exp (log x * z)
Theorem: EMetric.uniformEmbedding_iff'
File: Mathlib/Topology/MetricSpace/EMetricSpace.lean

tactic: rw [uniformEmbedding_iff_uniformInducing, uniformInducing_iff, uniformContinuous_iff]
state_before: α : Type u
β : Type v
X : Type ?u.310325
inst✝² : PseudoEMetricSpace α
γ : Type w
inst✝¹ : EMetricSpace γ
inst✝ : EMetricSpace β
f : γ → β
⊢ UniformEmbedding f ↔
    (∀ (ε : ℝ≥0∞), ε > 0 → ∃ δ, δ > 0 ∧ ∀ {a b : γ}, edist a b < δ → edist (f a) (f b) < ε) ∧
      ∀ (δ : ℝ≥0∞), δ > 0 → ∃ ε, ε > 0 ∧ ∀ {a b : γ}, edist (f a) (f b) < ε → edist a b < δ
Theorem: LipschitzOnWith.of_le_add_mul
File: Mathlib/Topology/MetricSpace/Lipschitz.lean

tactic: simpa only [Real.toNNReal_coe] using LipschitzOnWith.of_le_add_mul' K h
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoMetricSpace α
inst✝¹ : PseudoMetricSpace β
inst✝ : PseudoMetricSpace γ
K✝ : ℝ≥0
s : Set α
f✝ : α → β
f : α → ℝ
K : ℝ≥0
h : ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → f x ≤ f y + ↑K * dist x y
⊢ LipschitzOnWith K f s
Theorem: CategoryTheory.MorphismProperty.naturalityProperty.stableUnderInverse
File: Mathlib/CategoryTheory/MorphismProperty.lean

tactic: simp only [naturalityProperty] at he⊢
state_before: C : Type u
inst✝¹ : Category C
D : Type u_2
inst✝ : Category D
F₁ F₂ : C ⥤ D
app : (X : C) → F₁.obj X ⟶ F₂.obj X
X Y : C
e : X ≅ Y
he : naturalityProperty app e.hom
⊢ naturalityProperty app e.inv

tactic: rw [← cancel_epi (F₁.map e.hom)]
state_before: C : Type u
inst✝¹ : Category C
D : Type u_2
inst✝ : Category D
F₁ F₂ : C ⥤ D
app : (X : C) → F₁.obj X ⟶ F₂.obj X
X Y : C
e : X ≅ Y
he : F₁.map e.hom ≫ app Y = app X ≫ F₂.map e.hom
⊢ F₁.map e.inv ≫ app X = app Y ≫ F₂.map e.inv

tactic: slice_rhs 1 2 => rw [he]
state_before: C : Type u
inst✝¹ : Category C
D : Type u_2
inst✝ : Category D
F₁ F₂ : C ⥤ D
app : (X : C) → F₁.obj X ⟶ F₂.obj X
X Y : C
e : X ≅ Y
he : F₁.map e.hom ≫ app Y = app X ≫ F₂.map e.hom
⊢ F₁.map e.hom ≫ F₁.map e.inv ≫ app X = F₁.map e.hom ≫ app Y ≫ F₂.map e.inv

tactic: simp only [Category.assoc, ← F₁.map_comp_assoc, ← F₂.map_comp, e.hom_inv_id, Functor.map_id,
  Category.id_comp, Category.comp_id]
state_before: C : Type u
inst✝¹ : Category C
D : Type u_2
inst✝ : Category D
F₁ F₂ : C ⥤ D
app : (X : C) → F₁.obj X ⟶ F₂.obj X
X Y : C
e : X ≅ Y
he : F₁.map e.hom ≫ app Y = app X ≫ F₂.map e.hom
⊢ F₁.map e.hom ≫ F₁.map e.inv ≫ app X = (app X ≫ F₂.map e.hom) ≫ F₂.map e.inv
Theorem: LinearMap.trace_eq_matrix_trace_of_finset
File: Mathlib/LinearAlgebra/Trace.lean

tactic: have : ∃ s : Finset M, Nonempty (Basis s R M) := ⟨s, ⟨b⟩⟩
state_before: R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type ?u.216025
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b✝ : Basis ι R M
c : Basis κ R M
s : Finset M
b : Basis { x // x ∈ s } R M
f : M →ₗ[R] M
⊢ ↑(trace R M) f = Matrix.trace (↑(toMatrix b b) f)

tactic: rw [trace, dif_pos this, ← traceAux_def]
state_before: R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type ?u.216025
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b✝ : Basis ι R M
c : Basis κ R M
s : Finset M
b : Basis { x // x ∈ s } R M
f : M →ₗ[R] M
this : ∃ s, Nonempty (Basis { x // x ∈ s } R M)
⊢ ↑(trace R M) f = Matrix.trace (↑(toMatrix b b) f)

tactic: congr 1
state_before: R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type ?u.216025
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b✝ : Basis ι R M
c : Basis κ R M
s : Finset M
b : Basis { x // x ∈ s } R M
f : M →ₗ[R] M
this : ∃ s, Nonempty (Basis { x // x ∈ s } R M)
⊢ ↑(traceAux R (Nonempty.some (_ : Nonempty (Basis { x // x ∈ Exists.choose this } R M)))) f = ↑(traceAux R b) f

tactic: apply traceAux_eq
state_before: case e_a
R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type ?u.216025
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b✝ : Basis ι R M
c : Basis κ R M
s : Finset M
b : Basis { x // x ∈ s } R M
f : M →ₗ[R] M
this : ∃ s, Nonempty (Basis { x // x ∈ s } R M)
⊢ traceAux R (Nonempty.some (_ : Nonempty (Basis { x // x ∈ Exists.choose this } R M))) = traceAux R b
Theorem: sup_sdiff_left_self
File: Mathlib/Order/Heyting/Basic.lean

tactic: rw [sup_comm, sup_sdiff_right_self]
state_before: ι : Type ?u.137716
α : Type u_1
β : Type ?u.137722
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ (a ⊔ b) \ a = b \ a
Theorem: ball_div
File: Mathlib/Analysis/Normed/Group/Pointwise.lean

tactic: simp [div_eq_mul_inv]
state_before: E : Type u_1
inst✝ : SeminormedCommGroup E
ε δ : ℝ
s t : Set E
x y : E
⊢ ball x δ / s = x • thickening δ s⁻¹
Theorem: Cubic.natDegree_of_c_ne_zero
File: Mathlib/Algebra/CubicDiscriminant.lean

tactic: rw [of_b_eq_zero ha hb, natDegree_linear hc]
state_before: R : Type u_1
S : Type ?u.591482
F : Type ?u.591485
K : Type ?u.591488
P Q : Cubic R
a b c d a' b' c' d' : R
inst✝ : Semiring R
ha : P.a = 0
hb : P.b = 0
hc : P.c ≠ 0
⊢ natDegree (toPoly P) = 1
Theorem: EuclideanGeometry.sin_angle_of_angle_eq_pi_div_two
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean

tactic: rw [angle, ← inner_eq_zero_iff_angle_eq_pi_div_two, real_inner_comm, ← neg_eq_zero, ←
  inner_neg_left, neg_vsub_eq_vsub_rev] at h
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p₁ p₂ p₃ : P
h : ∠ p₁ p₂ p₃ = π / 2
h0 : p₁ ≠ p₂ ∨ p₃ ≠ p₂
⊢ Real.sin (∠ p₂ p₃ p₁) = dist p₁ p₂ / dist p₁ p₃

tactic: rw [← @vsub_ne_zero V, @ne_comm _ p₃, ← @vsub_ne_zero V _ _ _ p₂, or_comm] at h0
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p₁ p₂ p₃ : P
h : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0
h0 : p₁ ≠ p₂ ∨ p₃ ≠ p₂
⊢ Real.sin (∠ p₂ p₃ p₁) = dist p₁ p₂ / dist p₁ p₃

tactic: rw [angle, dist_eq_norm_vsub V p₁ p₂, dist_eq_norm_vsub V p₁ p₃, ← vsub_add_vsub_cancel p₁ p₂ p₃,
  add_comm, sin_angle_add_of_inner_eq_zero h h0]
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p₁ p₂ p₃ : P
h : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0
h0 : p₂ -ᵥ p₃ ≠ 0 ∨ p₁ -ᵥ p₂ ≠ 0
⊢ Real.sin (∠ p₂ p₃ p₁) = dist p₁ p₂ / dist p₁ p₃
Theorem: MeasureTheory.measure_union_add_inter'
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: rw [union_comm, inter_comm, measure_union_add_inter t hs, add_comm]
state_before: α : Type u_1
β : Type ?u.6873
γ : Type ?u.6876
δ : Type ?u.6879
ι : Type ?u.6882
R : Type ?u.6885
R' : Type ?u.6888
m : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s s₁ s₂ t✝ : Set α
hs : MeasurableSet s
t : Set α
⊢ ↑↑μ (s ∪ t) + ↑↑μ (s ∩ t) = ↑↑μ s + ↑↑μ t
Theorem: Cardinal.lt_univ'
File: Mathlib/SetTheory/Ordinal/Basic.lean

tactic: let ⟨a, e, h'⟩ := lt_lift_iff.1 h
state_before: α : Type ?u.235536
β : Type ?u.235539
γ : Type ?u.235542
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
c : Cardinal
h : c < univ
⊢ ∃ c', c = lift c'

tactic: rw [← univ_id] at h'
state_before: α : Type ?u.235536
β : Type ?u.235539
γ : Type ?u.235542
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
c : Cardinal
h : c < univ
a : Cardinal
e : lift a = c
h' : a < (#Ordinal)
⊢ ∃ c', c = lift c'

tactic: rcases lt_univ.{u}.1 h' with ⟨c', rfl⟩
state_before: α : Type ?u.235536
β : Type ?u.235539
γ : Type ?u.235542
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
c : Cardinal
h : c < univ
a : Cardinal
e : lift a = c
h' : a < univ
⊢ ∃ c', c = lift c'

tactic: exact ⟨c', by simp only [e.symm, lift_lift]⟩
state_before: case intro
α : Type ?u.235536
β : Type ?u.235539
γ : Type ?u.235542
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
c : Cardinal
h : c < univ
c' : Cardinal
e : lift (lift c') = c
h' : lift c' < univ
⊢ ∃ c', c = lift c'

tactic: simp only [e.symm, lift_lift]
state_before: α : Type ?u.235536
β : Type ?u.235539
γ : Type ?u.235542
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
c : Cardinal
h : c < univ
c' : Cardinal
e : lift (lift c') = c
h' : lift c' < univ
⊢ c = lift c'
Theorem: Composition.length_pos_of_pos
File: Mathlib/Combinatorics/Composition.lean

tactic: apply length_pos_of_sum_pos
state_before: n : ℕ
c : Composition n
h : 0 < n
⊢ 0 < length c

tactic: convert h
state_before: case h
n : ℕ
c : Composition n
h : 0 < n
⊢ 0 < sum c.blocks

tactic: exact c.blocks_sum
state_before: case h.e'_4
n : ℕ
c : Composition n
h : 0 < n
⊢ sum c.blocks = n
Theorem: Set.piecewise_empty
File: Mathlib/Data/Set/Function.lean

tactic: ext i
state_before: α : Type u_1
β : Type ?u.71934
γ : Type ?u.71937
ι : Sort ?u.71940
π : α → Type ?u.71945
δ : α → Sort u_2
s : Set α
f g : (i : α) → δ i
inst✝ : (i : α) → Decidable (i ∈ ∅)
⊢ piecewise ∅ f g = g

tactic: simp [piecewise]
state_before: case h
α : Type u_1
β : Type ?u.71934
γ : Type ?u.71937
ι : Sort ?u.71940
π : α → Type ?u.71945
δ : α → Sort u_2
s : Set α
f g : (i : α) → δ i
inst✝ : (i : α) → Decidable (i ∈ ∅)
i : α
⊢ piecewise ∅ f g i = g i
Theorem: Nat.Partrec.Code.eval_const
File: Mathlib/Computability/PartrecCode.lean

tactic: simp! [eval_const n m]
state_before: n m : ℕ
⊢ eval (Code.const (n + 1)) m = Part.some (n + 1)
Theorem: Int.mul_div_cancel
File: Std/Data/Int/DivMod.lean

tactic: rw [← ofNat_mul, ← ofNat_div,
  Nat.mul_div_cancel _ <| Nat.pos_of_ne_zero <| Int.ofNat_ne_zero.1 H]
state_before: a b : Int
H✝ : b ≠ 0
a✝ b✝ : Nat
H : ↑b✝ ≠ 0
⊢ div (↑a✝ * ↑b✝) ↑b✝ = ↑a✝

tactic: rw [Int.mul_neg, Int.neg_div, Int.div_neg, Int.neg_neg,
  this (Int.neg_ne_zero.1 H)]
state_before: a✝ b✝ : Int
this : ∀ {a b : Nat}, ↑b ≠ 0 → div (↑a * ↑b) ↑b = ↑a
a b : Nat
H : -↑b ≠ 0
⊢ div (↑a * -↑b) (-↑b) = ↑a

tactic: rw [Int.neg_mul, Int.neg_div, this H]
state_before: a✝ b✝ : Int
this : ∀ {a b : Nat}, ↑b ≠ 0 → div (↑a * ↑b) ↑b = ↑a
a b : Nat
H : ↑b ≠ 0
⊢ div (-↑a * ↑b) ↑b = -↑a

tactic: rw [Int.neg_mul_neg, Int.div_neg, this (Int.neg_ne_zero.1 H)]
state_before: a✝ b✝ : Int
this : ∀ {a b : Nat}, ↑b ≠ 0 → div (↑a * ↑b) ↑b = ↑a
a b : Nat
H : -↑b ≠ 0
⊢ div (-↑a * -↑b) (-↑b) = -↑a
Theorem: isCoprime_zero_left
File: Mathlib/RingTheory/Coprime/Basic.lean

tactic: rwa [mul_zero, zero_add, mul_comm] at H
state_before: R : Type u
inst✝ : CommSemiring R
x y z : R
x✝ : IsCoprime 0 x
a b : R
H : a * 0 + b * x = 1
⊢ x * b = 1

tactic: rwa [one_mul, zero_add]
state_before: R : Type u
inst✝ : CommSemiring R
x y z : R
H : IsUnit x
b : R
hb : b * x = 1
⊢ 1 * 0 + b * x = 1
Theorem: Bool.or_inl
File: Mathlib/Data/Bool/Basic.lean

tactic: simp [H]
state_before: a b : Bool
H : a = true
⊢ (a || b) = true
Theorem: List.tailD_eq_tail?
File: Std/Data/List/Lemmas.lean

tactic: cases l <;> rfl
state_before: α : Type u_1
l l' : List α
⊢ tailD l l' = Option.getD (tail? l) l'
Theorem: ExistsUnique.elim₂
File: Mathlib/Logic/Basic.lean

tactic: simp only [exists_unique_iff_exists] at h₂
state_before: ι : Sort ?u.24682
α✝ : Sort ?u.24687
κ : ι → Sort ?u.24684
p✝ q✝ : α✝ → Prop
α : Sort u_1
p : α → Sort u_2
inst✝ : ∀ (x : α), Subsingleton (p x)
q : (x : α) → p x → Prop
b : Prop
h₂ : ∃! x h, q x h
h₁ : ∀ (x : α) (h : p x), q x h → (∀ (y : α) (hy : p y), q y hy → y = x) → b
⊢ b

tactic: apply h₂.elim
state_before: ι : Sort ?u.24682
α✝ : Sort ?u.24687
κ : ι → Sort ?u.24684
p✝ q✝ : α✝ → Prop
α : Sort u_1
p : α → Sort u_2
inst✝ : ∀ (x : α), Subsingleton (p x)
q : (x : α) → p x → Prop
b : Prop
h₁ : ∀ (x : α) (h : p x), q x h → (∀ (y : α) (hy : p y), q y hy → y = x) → b
h₂ : ∃! x, ∃ h, q x h
⊢ b

tactic: exact fun x ⟨hxp, hxq⟩ H ↦ h₁ x hxp hxq fun y hyp hyq ↦ H y ⟨hyp, hyq⟩
state_before: ι : Sort ?u.24682
α✝ : Sort ?u.24687
κ : ι → Sort ?u.24684
p✝ q✝ : α✝ → Prop
α : Sort u_1
p : α → Sort u_2
inst✝ : ∀ (x : α), Subsingleton (p x)
q : (x : α) → p x → Prop
b : Prop
h₁ : ∀ (x : α) (h : p x), q x h → (∀ (y : α) (hy : p y), q y hy → y = x) → b
h₂ : ∃! x, ∃ h, q x h
⊢ ∀ (x : α), (∃ h, q x h) → (∀ (y : α), (∃ h, q y h) → y = x) → b
Theorem: multiplicity.eq_top_iff
File: Mathlib/RingTheory/Multiplicity.lean

tactic: simp only [Classical.not_not]
state_before: α : Type u_1
inst✝¹ : Monoid α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
⊢ (∀ (n : ℕ), ¬¬a ^ (n + 1) ∣ b) ↔ ∀ (n : ℕ), a ^ n ∣ b

tactic: exact
  ⟨fun h n =>
    Nat.casesOn n
      (by
        rw [_root_.pow_zero]
        exact one_dvd _)
      fun n => h _,
    fun h n => h _⟩
state_before: α : Type u_1
inst✝¹ : Monoid α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
⊢ (∀ (n : ℕ), a ^ (n + 1) ∣ b) ↔ ∀ (n : ℕ), a ^ n ∣ b

tactic: rw [_root_.pow_zero]
state_before: α : Type u_1
inst✝¹ : Monoid α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
h : ∀ (n : ℕ), a ^ (n + 1) ∣ b
n : ℕ
⊢ a ^ zero ∣ b

tactic: exact one_dvd _
state_before: α : Type u_1
inst✝¹ : Monoid α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
h : ∀ (n : ℕ), a ^ (n + 1) ∣ b
n : ℕ
⊢ 1 ∣ b
Theorem: Nat.ArithmeticFunction.ppow_apply
File: Mathlib/NumberTheory/ArithmeticFunction.lean

tactic: rw [ppow, dif_neg (ne_of_gt kpos)]
state_before: R : Type u_1
inst✝ : Semiring R
f : ArithmeticFunction R
k x : ℕ
kpos : 0 < k
⊢ ↑(ppow f k) x = ↑f x ^ k

tactic: rfl
state_before: R : Type u_1
inst✝ : Semiring R
f : ArithmeticFunction R
k x : ℕ
kpos : 0 < k
⊢ ↑{ toFun := fun x => ↑f x ^ k, map_zero' := (_ : (fun x => ↑f x ^ k) 0 = 0) } x = ↑f x ^ k
Theorem: MeasureTheory.SimpleFunc.norm_approxOn_zero_le
File: Mathlib/MeasureTheory/Function/SimpleFuncDenseLp.lean

tactic: have := edist_approxOn_y0_le hf h₀ x n
state_before: α : Type ?u.14817
β : Type u_2
ι : Type ?u.14823
E : Type u_1
F : Type ?u.14829
𝕜 : Type ?u.14832
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace E
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
q : ℝ
p : ℝ≥0∞
inst✝¹ : OpensMeasurableSpace E
f : β → E
hf : Measurable f
s : Set E
h₀ : 0 ∈ s
inst✝ : SeparableSpace ↑s
x : β
n : ℕ
⊢ ‖↑(approxOn f hf s 0 h₀ n) x‖ ≤ ‖f x‖ + ‖f x‖

tactic: simp [edist_comm (0 : E), edist_eq_coe_nnnorm] at this
state_before: α : Type ?u.14817
β : Type u_2
ι : Type ?u.14823
E : Type u_1
F : Type ?u.14829
𝕜 : Type ?u.14832
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace E
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
q : ℝ
p : ℝ≥0∞
inst✝¹ : OpensMeasurableSpace E
f : β → E
hf : Measurable f
s : Set E
h₀ : 0 ∈ s
inst✝ : SeparableSpace ↑s
x : β
n : ℕ
this : edist 0 (↑(approxOn f hf s 0 h₀ n) x) ≤ edist 0 (f x) + edist 0 (f x)
⊢ ‖↑(approxOn f hf s 0 h₀ n) x‖ ≤ ‖f x‖ + ‖f x‖

tactic: exact_mod_cast this
state_before: α : Type ?u.14817
β : Type u_2
ι : Type ?u.14823
E : Type u_1
F : Type ?u.14829
𝕜 : Type ?u.14832
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace E
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
q : ℝ
p : ℝ≥0∞
inst✝¹ : OpensMeasurableSpace E
f : β → E
hf : Measurable f
s : Set E
h₀ : 0 ∈ s
inst✝ : SeparableSpace ↑s
x : β
n : ℕ
this : ↑‖↑(approxOn f hf s 0 h₀ n) x‖₊ ≤ ↑‖f x‖₊ + ↑‖f x‖₊
⊢ ‖↑(approxOn f hf s 0 h₀ n) x‖ ≤ ‖f x‖ + ‖f x‖
Theorem: MeasurableSpace.generateFrom_singleton_empty
File: Mathlib/MeasureTheory/MeasurableSpaceDef.lean

tactic: simp [@MeasurableSet.empty α ⊥]
state_before: α : Type u_1
β : Type ?u.20176
γ : Type ?u.20179
δ : Type ?u.20182
δ' : Type ?u.20185
ι : Sort ?u.20188
s t u : Set α
⊢ ∀ (t : Set α), t ∈ {∅} → MeasurableSet t
Theorem: FirstOrder.Language.withConstants_funMap_sum_inr
File: Mathlib/ModelTheory/LanguageMap.lean

tactic: rw [Unique.eq_default x]
state_before: L : Language
L' : Language
M : Type w
inst✝¹ : Structure L M
α : Type u_1
inst✝ : Structure (constantsOn α) M
a : α
x : Fin 0 → M
⊢ funMap (Sum.inr a) x = ↑(Language.con L a)

tactic: exact (LHom.sumInr : constantsOn α →ᴸ L.sum _).map_onFunction _ _
state_before: L : Language
L' : Language
M : Type w
inst✝¹ : Structure L M
α : Type u_1
inst✝ : Structure (constantsOn α) M
a : α
x : Fin 0 → M
⊢ funMap (Sum.inr a) default = ↑(Language.con L a)
Theorem: Finset.noncommProd_congr
File: Mathlib/Data/Finset/NoncommProd.lean

tactic: dsimp only
state_before: F : Type ?u.139635
ι : Type ?u.139638
α : Type ?u.139641
β : Type ?u.139644
γ : Type ?u.139647
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s₁ s₂ : Finset α
f g : α → β
h₁ : s₁ = s₂
h₂ : ∀ (x : α), x ∈ s₂ → f x = g x
comm : Set.Pairwise ↑s₁ fun a b => Commute (f a) (f b)
x : α
hx : x ∈ ↑s₂
y : α
hy : y ∈ ↑s₂
h : x ≠ y
⊢ (fun a b => Commute (g a) (g b)) x y

tactic: rw [← h₂ _ hx, ← h₂ _ hy]
state_before: F : Type ?u.139635
ι : Type ?u.139638
α : Type ?u.139641
β : Type ?u.139644
γ : Type ?u.139647
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s₁ s₂ : Finset α
f g : α → β
h₁ : s₁ = s₂
h₂ : ∀ (x : α), x ∈ s₂ → f x = g x
comm : Set.Pairwise ↑s₁ fun a b => Commute (f a) (f b)
x : α
hx : x ∈ ↑s₂
y : α
hy : y ∈ ↑s₂
h : x ≠ y
⊢ Commute (g x) (g y)

tactic: subst h₁
state_before: F : Type ?u.139635
ι : Type ?u.139638
α : Type ?u.139641
β : Type ?u.139644
γ : Type ?u.139647
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s₁ s₂ : Finset α
f g : α → β
h₁ : s₁ = s₂
h₂ : ∀ (x : α), x ∈ s₂ → f x = g x
comm : Set.Pairwise ↑s₁ fun a b => Commute (f a) (f b)
x : α
hx : x ∈ ↑s₂
y : α
hy : y ∈ ↑s₂
h : x ≠ y
⊢ Commute (f x) (f y)

tactic: exact comm hx hy h
state_before: F : Type ?u.139635
ι : Type ?u.139638
α : Type ?u.139641
β : Type ?u.139644
γ : Type ?u.139647
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s₁ : Finset α
f g : α → β
comm : Set.Pairwise ↑s₁ fun a b => Commute (f a) (f b)
x y : α
h : x ≠ y
h₂ : ∀ (x : α), x ∈ s₁ → f x = g x
hx : x ∈ ↑s₁
hy : y ∈ ↑s₁
⊢ Commute (f x) (f y)

tactic: simp_rw [noncommProd, Multiset.map_congr (congr_arg _ h₁) h₂]
state_before: F : Type ?u.139635
ι : Type ?u.139638
α : Type u_1
β : Type u_2
γ : Type ?u.139647
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s₁ s₂ : Finset α
f g : α → β
h₁ : s₁ = s₂
h₂ : ∀ (x : α), x ∈ s₂ → f x = g x
comm : Set.Pairwise ↑s₁ fun a b => Commute (f a) (f b)
⊢ noncommProd s₁ f comm =
    noncommProd s₂ g (_ : ∀ (x : α), x ∈ ↑s₂ → ∀ (y : α), y ∈ ↑s₂ → x ≠ y → (fun a b => Commute (g a) (g b)) x y)
Theorem: List.mem_eraseP_of_neg
File: Std/Data/List/Lemmas.lean

tactic: refine ⟨mem_of_mem_eraseP, fun al => ?_⟩
state_before: α : Type u_1
p : α → Bool
a : α
l : List α
pa : ¬p a = true
⊢ a ∈ eraseP p l ↔ a ∈ l

tactic: match exists_or_eq_self_of_eraseP p l with
| .inl h => rw [h]; assumption
| .inr ⟨c, l₁, l₂, h₁, h₂, h₃, h₄⟩ =>
  rw [h₄]; rw [h₃] at al
  have : a ≠ c := fun h => (h ▸ pa).elim h₂
  simp [this] at al; simp [al]
state_before: α : Type u_1
p : α → Bool
a : α
l : List α
pa : ¬p a = true
al : a ∈ l
⊢ a ∈ eraseP p l

tactic: rw [h]
state_before: α : Type u_1
p : α → Bool
a : α
l : List α
pa : ¬p a = true
al : a ∈ l
h : eraseP p l = l
⊢ a ∈ eraseP p l

tactic: assumption
state_before: α : Type u_1
p : α → Bool
a : α
l : List α
pa : ¬p a = true
al : a ∈ l
h : eraseP p l = l
⊢ a ∈ l

tactic: rw [h₄]
state_before: α : Type u_1
p : α → Bool
a : α
l : List α
pa : ¬p a = true
al : a ∈ l
c : α
l₁ l₂ : List α
h₁ : ∀ (b : α), b ∈ l₁ → ¬p b = true
h₂ : p c = true
h₃ : l = l₁ ++ c :: l₂
h₄ : eraseP p l = l₁ ++ l₂
⊢ a ∈ eraseP p l

tactic: rw [h₃] at al
state_before: α : Type u_1
p : α → Bool
a : α
l : List α
pa : ¬p a = true
al : a ∈ l
c : α
l₁ l₂ : List α
h₁ : ∀ (b : α), b ∈ l₁ → ¬p b = true
h₂ : p c = true
h₃ : l = l₁ ++ c :: l₂
h₄ : eraseP p l = l₁ ++ l₂
⊢ a ∈ l₁ ++ l₂

tactic: have : a ≠ c := fun h => (h ▸ pa).elim h₂
state_before: α : Type u_1
p : α → Bool
a : α
l : List α
pa : ¬p a = true
c : α
l₁ l₂ : List α
al : a ∈ l₁ ++ c :: l₂
h₁ : ∀ (b : α), b ∈ l₁ → ¬p b = true
h₂ : p c = true
h₃ : l = l₁ ++ c :: l₂
h₄ : eraseP p l = l₁ ++ l₂
⊢ a ∈ l₁ ++ l₂

tactic: simp [this] at al
state_before: α : Type u_1
p : α → Bool
a : α
l : List α
pa : ¬p a = true
c : α
l₁ l₂ : List α
al : a ∈ l₁ ++ c :: l₂
h₁ : ∀ (b : α), b ∈ l₁ → ¬p b = true
h₂ : p c = true
h₃ : l = l₁ ++ c :: l₂
h₄ : eraseP p l = l₁ ++ l₂
this : a ≠ c
⊢ a ∈ l₁ ++ l₂

tactic: simp [al]
state_before: α : Type u_1
p : α → Bool
a : α
l : List α
pa : ¬p a = true
c : α
l₁ l₂ : List α
h₁ : ∀ (b : α), b ∈ l₁ → ¬p b = true
h₂ : p c = true
h₃ : l = l₁ ++ c :: l₂
h₄ : eraseP p l = l₁ ++ l₂
this : a ≠ c
al : a ∈ l₁ ∨ a ∈ l₂
⊢ a ∈ l₁ ++ l₂
Theorem: List.leftpad_prefix
File: Std/Data/List/Lemmas.lean

tactic: simp only [isPrefix, leftpad]
state_before: α : Type u_1
n : Nat
a : α
l : List α
⊢ replicate (n - length l) a <+: leftpad n a l

tactic: exact Exists.intro l rfl
state_before: α : Type u_1
n : Nat
a : α
l : List α
⊢ ∃ t, replicate (n - length l) a ++ t = replicate (n - length l) a ++ l
Theorem: Finset.offDiag_card
File: Mathlib/Data/Finset/Prod.lean

tactic: conv_rhs => { rw [← s.diag_card] }
state_before: α : Type u_1
β : Type ?u.112877
γ : Type ?u.112880
inst✝ : DecidableEq α
s t : Finset α
x : α × α
this : card (diag s) + card (offDiag s) = card s * card s
⊢ card (offDiag s) = card s * card s - card s

tactic: simp only [diag_card] at *
state_before: α : Type u_1
β : Type ?u.112877
γ : Type ?u.112880
inst✝ : DecidableEq α
s t : Finset α
x : α × α
this : card (diag s) + card (offDiag s) = card s * card s
⊢ card (offDiag s) = card (diag s) * card (diag s) - card (diag s)

tactic: rw [tsub_eq_of_eq_add_rev]
state_before: α : Type u_1
β : Type ?u.112877
γ : Type ?u.112880
inst✝ : DecidableEq α
s t : Finset α
x : α × α
this : card s + card (offDiag s) = card s * card s
⊢ card (offDiag s) = card s * card s - card s

tactic: rw [this]
state_before: α : Type u_1
β : Type ?u.112877
γ : Type ?u.112880
inst✝ : DecidableEq α
s t : Finset α
x : α × α
this : card s + card (offDiag s) = card s * card s
⊢ card s * card s = card s + card (offDiag s)

tactic: rw [← card_product, diag, offDiag]
state_before: α : Type u_1
β : Type ?u.112877
γ : Type ?u.112880
inst✝ : DecidableEq α
s t : Finset α
x : α × α
⊢ card (diag s) + card (offDiag s) = card s * card s

tactic: conv_rhs => rw [← filter_card_add_filter_neg_card_eq_card (fun a => a.1 = a.2)]
state_before: α : Type u_1
β : Type ?u.112877
γ : Type ?u.112880
inst✝ : DecidableEq α
s t : Finset α
x : α × α
⊢ card (filter (fun a => a.fst = a.snd) (s ×ˢ s)) + card (filter (fun a => a.fst ≠ a.snd) (s ×ˢ s)) = card (s ×ˢ s)
Theorem: Cardinal.mk_insert
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: rw [← union_singleton, mk_union_of_disjoint, mk_singleton]
state_before: α✝ β α : Type u
s : Set α
a : α
h : ¬a ∈ s
⊢ (#↑(insert a s)) = (#↑s) + 1

tactic: simpa
state_before: α✝ β α : Type u
s : Set α
a : α
h : ¬a ∈ s
⊢ Disjoint s {a}