tasksource/leandojo huggingface dataset:
Theorem: Metric.tendsto_atTop
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: simp only [true_and]
state_before: α : Type u
β : Type v
X : Type ?u.140991
ι : Type ?u.140994
inst✝² : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
inst✝¹ : Nonempty β
inst✝ : SemilatticeSup β
u : β → α
a : α
⊢ (∀ (ib : ℝ), 0 < ib → ∃ ia, True ∧ ∀ (x : β), x ∈ Ici ia → u x ∈ ball a ib) ↔
    ∀ (ε : ℝ), ε > 0 → ∃ N, ∀ (n : β), n ≥ N → dist (u n) a < ε

tactic: rfl
state_before: α : Type u
β : Type v
X : Type ?u.140991
ι : Type ?u.140994
inst✝² : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
inst✝¹ : Nonempty β
inst✝ : SemilatticeSup β
u : β → α
a : α
⊢ (∀ (ib : ℝ), 0 < ib → ∃ ia, ∀ (x : β), x ∈ Ici ia → u x ∈ ball a ib) ↔
    ∀ (ε : ℝ), ε > 0 → ∃ N, ∀ (n : β), n ≥ N → dist (u n) a < ε
Theorem: Finset.eq_singleton_iff_unique_mem
File: Mathlib/Data/Finset/Basic.lean

tactic: constructor <;> intro t
state_before: α : Type u_1
β : Type ?u.30589
γ : Type ?u.30592
s✝ : Finset α
a✝ b : α
s : Finset α
a : α
⊢ s = {a} ↔ a ∈ s ∧ ∀ (x : α), x ∈ s → x = a

tactic: rw [t]
state_before: case mp
α : Type u_1
β : Type ?u.30589
γ : Type ?u.30592
s✝ : Finset α
a✝ b : α
s : Finset α
a : α
t : s = {a}
⊢ a ∈ s ∧ ∀ (x : α), x ∈ s → x = a

tactic: exact ⟨Finset.mem_singleton_self _, fun _ => Finset.mem_singleton.1⟩
state_before: case mp
α : Type u_1
β : Type ?u.30589
γ : Type ?u.30592
s✝ : Finset α
a✝ b : α
s : Finset α
a : α
t : s = {a}
⊢ a ∈ {a} ∧ ∀ (x : α), x ∈ {a} → x = a

tactic: ext
state_before: case mpr
α : Type u_1
β : Type ?u.30589
γ : Type ?u.30592
s✝ : Finset α
a✝ b : α
s : Finset α
a : α
t : a ∈ s ∧ ∀ (x : α), x ∈ s → x = a
⊢ s = {a}

tactic: rw [Finset.mem_singleton]
state_before: case mpr.a
α : Type u_1
β : Type ?u.30589
γ : Type ?u.30592
s✝ : Finset α
a✝¹ b : α
s : Finset α
a : α
t : a ∈ s ∧ ∀ (x : α), x ∈ s → x = a
a✝ : α
⊢ a✝ ∈ s ↔ a✝ ∈ {a}

tactic: exact ⟨t.right _, fun r => r.symm ▸ t.left⟩
state_before: case mpr.a
α : Type u_1
β : Type ?u.30589
γ : Type ?u.30592
s✝ : Finset α
a✝¹ b : α
s : Finset α
a : α
t : a ∈ s ∧ ∀ (x : α), x ∈ s → x = a
a✝ : α
⊢ a✝ ∈ s ↔ a✝ = a
Theorem: LinearLocallyFiniteOrder.isGLB_Ioc_of_isGLB_Ioi
File: Mathlib/Order/SuccPred/LinearLocallyFinite.lean

tactic: simp_rw [IsGLB, IsGreatest, mem_upperBounds, mem_lowerBounds] at h⊢
state_before: ι : Type u_1
inst✝ : LinearOrder ι
i j k : ι
hij_lt : i < j
h : IsGLB (Set.Ioi i) k
⊢ IsGLB (Set.Ioc i j) k

tactic: refine' ⟨fun x hx ↦ h.1 x hx.1, fun x hx ↦ h.2 x _⟩
state_before: ι : Type u_1
inst✝ : LinearOrder ι
i j k : ι
hij_lt : i < j
h : (∀ (x : ι), x ∈ Set.Ioi i → k ≤ x) ∧ ∀ (x : ι), (∀ (x_1 : ι), x_1 ∈ Set.Ioi i → x ≤ x_1) → x ≤ k
⊢ (∀ (x : ι), x ∈ Set.Ioc i j → k ≤ x) ∧ ∀ (x : ι), (∀ (x_1 : ι), x_1 ∈ Set.Ioc i j → x ≤ x_1) → x ≤ k

tactic: intro y hy
state_before: ι : Type u_1
inst✝ : LinearOrder ι
i j k : ι
hij_lt : i < j
h : (∀ (x : ι), x ∈ Set.Ioi i → k ≤ x) ∧ ∀ (x : ι), (∀ (x_1 : ι), x_1 ∈ Set.Ioi i → x ≤ x_1) → x ≤ k
x : ι
hx : ∀ (x_1 : ι), x_1 ∈ Set.Ioc i j → x ≤ x_1
⊢ ∀ (x_1 : ι), x_1 ∈ Set.Ioi i → x ≤ x_1

tactic: cases' le_or_lt y j with h_le h_lt
state_before: ι : Type u_1
inst✝ : LinearOrder ι
i j k : ι
hij_lt : i < j
h : (∀ (x : ι), x ∈ Set.Ioi i → k ≤ x) ∧ ∀ (x : ι), (∀ (x_1 : ι), x_1 ∈ Set.Ioi i → x ≤ x_1) → x ≤ k
x : ι
hx : ∀ (x_1 : ι), x_1 ∈ Set.Ioc i j → x ≤ x_1
y : ι
hy : y ∈ Set.Ioi i
⊢ x ≤ y

tactic: exact hx y ⟨hy, h_le⟩
state_before: case inl
ι : Type u_1
inst✝ : LinearOrder ι
i j k : ι
hij_lt : i < j
h : (∀ (x : ι), x ∈ Set.Ioi i → k ≤ x) ∧ ∀ (x : ι), (∀ (x_1 : ι), x_1 ∈ Set.Ioi i → x ≤ x_1) → x ≤ k
x : ι
hx : ∀ (x_1 : ι), x_1 ∈ Set.Ioc i j → x ≤ x_1
y : ι
hy : y ∈ Set.Ioi i
h_le : y ≤ j
⊢ x ≤ y

tactic: exact le_trans (hx j ⟨hij_lt, le_rfl⟩) h_lt.le
state_before: case inr
ι : Type u_1
inst✝ : LinearOrder ι
i j k : ι
hij_lt : i < j
h : (∀ (x : ι), x ∈ Set.Ioi i → k ≤ x) ∧ ∀ (x : ι), (∀ (x_1 : ι), x_1 ∈ Set.Ioi i → x ≤ x_1) → x ≤ k
x : ι
hx : ∀ (x_1 : ι), x_1 ∈ Set.Ioc i j → x ≤ x_1
y : ι
hy : y ∈ Set.Ioi i
h_lt : j < y
⊢ x ≤ y
Theorem: MvFunctor.LiftP_def
File: Mathlib/Control/Functor/Multivariate.lean

tactic: simp [MvFunctor.map_map]
state_before: n : ℕ
α β γ : TypeVec n
F : TypeVec n → Type v
inst✝¹ : MvFunctor F
P : α ⟹ TypeVec.repeat n Prop
R : α ⊗ α ⟹ TypeVec.repeat n Prop
inst✝ : LawfulMvFunctor F
x : F α
⊢ ∀ (u : F fun i => Subtype ((fun i x => ofRepeat (P i x)) i)),
    (fun i => Subtype.val) <$$> u = x ↔ subtypeVal P <$$> toSubtype P <$$> u = x
Theorem: Submodule.map_equiv_eq_comap_symm
File: Mathlib/LinearAlgebra/Basic.lean

tactic: rw [mem_map_equiv, mem_comap, LinearEquiv.coe_coe]
state_before: R : Type u_1
R₁ : Type ?u.2273908
R₂ : Type u_2
R₃ : Type ?u.2273914
R₄ : Type ?u.2273917
S : Type ?u.2273920
K✝ : Type ?u.2273923
K₂ : Type ?u.2273926
M : Type u_3
M' : Type ?u.2273932
M₁ : Type ?u.2273935
M₂ : Type u_4
M₃ : Type ?u.2273941
M₄ : Type ?u.2273944
N : Type ?u.2273947
N₂ : Type ?u.2273950
ι : Type ?u.2273953
V : Type ?u.2273956
V₂ : Type ?u.2273959
inst✝¹¹ : CommSemiring R
inst✝¹⁰ : CommSemiring R₂
inst✝⁹ : AddCommMonoid M
inst✝⁸ : AddCommMonoid M₂
inst✝⁷ : Module R M
inst✝⁶ : Module R₂ M₂
inst✝⁵ : AddCommMonoid N
inst✝⁴ : AddCommMonoid N₂
inst✝³ : Module R N
inst✝² : Module R N₂
τ₁₂ : R →+* R₂
τ₂₁ : R₂ →+* R
inst✝¹ : RingHomInvPair τ₁₂ τ₂₁
inst✝ : RingHomInvPair τ₂₁ τ₁₂
p : Submodule R M
q : Submodule R₂ M₂
pₗ : Submodule R N
qₗ : Submodule R N₂
e : M ≃ₛₗ[τ₁₂] M₂
K : Submodule R M
x✝ : M₂
⊢ x✝ ∈ map (↑e) K ↔ x✝ ∈ comap (↑(LinearEquiv.symm e)) K
Theorem: Lists'.mem_of_subset'
File: Mathlib/SetTheory/Lists.lean

tactic: cases h
state_before: α : Type u_1
a : Lists α
x✝ : Lists' α true
h : a ∈ toList nil
⊢ a ∈ x✝

tactic: cases' s with _ _ _ _ _ e m s
state_before: α : Type u_1
a : Lists α
b✝ : Bool
a0 : Lists' α b✝
l0 l₂ : Lists' α true
s : cons' a0 l0 ⊆ l₂
h : a ∈ toList (cons' a0 l0)
⊢ a ∈ l₂

tactic: simp only [toList, Sigma.eta, List.find?, List.mem_cons] at h
state_before: case cons
α : Type u_1
a : Lists α
l0 l₂ : Lists' α true
a✝ a'✝ : Lists α
e : a✝ ~ a'✝
h : a ∈ toList (cons' a✝.snd l0)
m : a'✝ ∈ toList l₂
s : Subset l0 l₂
⊢ a ∈ l₂

tactic: rcases h with (rfl | h)
state_before: case cons
α : Type u_1
a : Lists α
l0 l₂ : Lists' α true
a✝ a'✝ : Lists α
e : a✝ ~ a'✝
m : a'✝ ∈ toList l₂
s : Subset l0 l₂
h : a = a✝ ∨ a ∈ toList l0
⊢ a ∈ l₂

tactic: exact ⟨_, m, e⟩
state_before: case cons.inl
α : Type u_1
a : Lists α
l0 l₂ : Lists' α true
a'✝ : Lists α
m : a'✝ ∈ toList l₂
s : Subset l0 l₂
e : a ~ a'✝
⊢ a ∈ l₂

tactic: exact mem_of_subset' s h
state_before: case cons.inr
α : Type u_1
a : Lists α
l0 l₂ : Lists' α true
a✝ a'✝ : Lists α
e : a✝ ~ a'✝
m : a'✝ ∈ toList l₂
s : Subset l0 l₂
h : a ∈ toList l0
⊢ a ∈ l₂
Theorem: OnePoint.not_mem_range_coe_iff
File: Mathlib/Topology/Compactification/OnePoint.lean

tactic: rw [← mem_compl_iff, compl_range_coe, mem_singleton_iff]
state_before: X : Type u_1
x : OnePoint X
⊢ ¬x ∈ range some ↔ x = ∞
Theorem: Ssyt.ext
File: Mathlib/Combinatorics/Young/SemistandardTableau.lean

tactic: funext
state_before: μ : YoungDiagram
T T' : Ssyt μ
h : ∀ (i j : ℕ), ↑T i j = ↑T' i j
x✝ : ℕ
⊢ ↑T x✝ = ↑T' x✝

tactic: apply h
state_before: case h
μ : YoungDiagram
T T' : Ssyt μ
h : ∀ (i j : ℕ), ↑T i j = ↑T' i j
x✝¹ x✝ : ℕ
⊢ ↑T x✝¹ x✝ = ↑T' x✝¹ x✝
Theorem: Metric.cthickening_eq_biUnion_closedBall
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: rcases eq_empty_or_nonempty E with (rfl | hne)
state_before: ι : Sort ?u.148509
α✝ : Type u
β : Type v
inst✝² : PseudoEMetricSpace α✝
δ ε : ℝ
s t : Set α✝
x : α✝
α : Type u_1
inst✝¹ : PseudoMetricSpace α
inst✝ : ProperSpace α
E : Set α
hδ : 0 ≤ δ
⊢ cthickening δ E = ⋃ (x : α) (_ : x ∈ closure E), closedBall x δ

tactic: rw [← cthickening_closure]
state_before: case inr
ι : Sort ?u.148509
α✝ : Type u
β : Type v
inst✝² : PseudoEMetricSpace α✝
δ ε : ℝ
s t : Set α✝
x : α✝
α : Type u_1
inst✝¹ : PseudoMetricSpace α
inst✝ : ProperSpace α
E : Set α
hδ : 0 ≤ δ
hne : Set.Nonempty E
⊢ cthickening δ E = ⋃ (x : α) (_ : x ∈ closure E), closedBall x δ

tactic: refine Subset.antisymm (fun x hx ↦ ?_)
  (iUnion₂_subset fun x hx ↦ closedBall_subset_cthickening hx _)
state_before: case inr
ι : Sort ?u.148509
α✝ : Type u
β : Type v
inst✝² : PseudoEMetricSpace α✝
δ ε : ℝ
s t : Set α✝
x : α✝
α : Type u_1
inst✝¹ : PseudoMetricSpace α
inst✝ : ProperSpace α
E : Set α
hδ : 0 ≤ δ
hne : Set.Nonempty E
⊢ cthickening δ (closure E) = ⋃ (x : α) (_ : x ∈ closure E), closedBall x δ

tactic: obtain ⟨y, yE, hy⟩ : ∃ y ∈ closure E, infDist x (closure E) = dist x y :=
  isClosed_closure.exists_infDist_eq_dist (closure_nonempty_iff.mpr hne) x
state_before: case inr
ι : Sort ?u.148509
α✝ : Type u
β : Type v
inst✝² : PseudoEMetricSpace α✝
δ ε : ℝ
s t : Set α✝
x✝ : α✝
α : Type u_1
inst✝¹ : PseudoMetricSpace α
inst✝ : ProperSpace α
E : Set α
hδ : 0 ≤ δ
hne : Set.Nonempty E
x : α
hx : x ∈ cthickening δ (closure E)
⊢ x ∈ ⋃ (x : α) (_ : x ∈ closure E), closedBall x δ

tactic: replace hy : dist x y ≤ δ :=
  (ENNReal.ofReal_le_ofReal_iff hδ).mp
    (((congr_arg ENNReal.ofReal hy.symm).le.trans ENNReal.ofReal_toReal_le).trans hx)
state_before: case inr.intro.intro
ι : Sort ?u.148509
α✝ : Type u
β : Type v
inst✝² : PseudoEMetricSpace α✝
δ ε : ℝ
s t : Set α✝
x✝ : α✝
α : Type u_1
inst✝¹ : PseudoMetricSpace α
inst✝ : ProperSpace α
E : Set α
hδ : 0 ≤ δ
hne : Set.Nonempty E
x : α
hx : x ∈ cthickening δ (closure E)
y : α
yE : y ∈ closure E
hy : infDist x (closure E) = dist x y
⊢ x ∈ ⋃ (x : α) (_ : x ∈ closure E), closedBall x δ

tactic: exact mem_biUnion yE hy
state_before: case inr.intro.intro
ι : Sort ?u.148509
α✝ : Type u
β : Type v
inst✝² : PseudoEMetricSpace α✝
δ ε : ℝ
s t : Set α✝
x✝ : α✝
α : Type u_1
inst✝¹ : PseudoMetricSpace α
inst✝ : ProperSpace α
E : Set α
hδ : 0 ≤ δ
hne : Set.Nonempty E
x : α
hx : x ∈ cthickening δ (closure E)
y : α
yE : y ∈ closure E
hy : dist x y ≤ δ
⊢ x ∈ ⋃ (x : α) (_ : x ∈ closure E), closedBall x δ

tactic: simp only [cthickening_empty, biUnion_empty, closure_empty]
state_before: case inl
ι : Sort ?u.148509
α✝ : Type u
β : Type v
inst✝² : PseudoEMetricSpace α✝
δ ε : ℝ
s t : Set α✝
x : α✝
α : Type u_1
inst✝¹ : PseudoMetricSpace α
inst✝ : ProperSpace α
hδ : 0 ≤ δ
⊢ cthickening δ ∅ = ⋃ (x : α) (_ : x ∈ closure ∅), closedBall x δ
Theorem: Matrix.nonsing_inv_mul_cancel_right
File: Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean

tactic: simp [Matrix.mul_assoc, nonsing_inv_mul A h]
state_before: l : Type ?u.212026
m : Type u
n : Type u'
α : Type v
inst✝² : Fintype n
inst✝¹ : DecidableEq n
inst✝ : CommRing α
A B✝ : Matrix n n α
B : Matrix m n α
h : IsUnit (det A)
⊢ B ⬝ A⁻¹ ⬝ A = B
Theorem: Computable.sum_casesOn
File: Mathlib/Computability/Partrec.lean

tactic: cases' f a with b c <;> simp [Nat.div2_val]
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
σ : Type u_4
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
f : α → β ⊕ γ
g : α → β → σ
h : α → γ → σ
hf : Computable f
hg : Computable₂ g
hh : Computable₂ h
a : α
⊢ (bif Nat.bodd (encode (f a)) then Option.map (h a) (decode (Nat.div2 (encode (f a))))
    else Option.map (g a) (decode (Nat.div2 (encode (f a))))) =
    Option.some (Sum.casesOn (f a) (g a) (h a))
Theorem: Submonoid.fromLeftInv_eq_iff
File: Mathlib/GroupTheory/Submonoid/Inverses.lean

tactic: rw [← IsUnit.mul_right_inj (leftInv_le_isUnit _ a.prop), S.mul_fromLeftInv, eq_comm]
state_before: M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
a : { x // x ∈ leftInv S }
b : M
⊢ ↑(fromLeftInv S a) = b ↔ ↑a * b = 1
Theorem: tendsto_inv_nhdsWithin_Ioi_inv
File: Mathlib/Topology/Algebra/Group/Basic.lean

tactic: simpa only [inv_inv] using @tendsto_inv_nhdsWithin_Ioi _ _ _ _ a⁻¹
state_before: α : Type u
β : Type v
G : Type w
H : Type x
inst✝⁶ : TopologicalSpace G
inst✝⁵ : Group G
inst✝⁴ : TopologicalGroup G
inst✝³ : TopologicalSpace α
f : α → G
s : Set α
x : α
inst✝² : TopologicalSpace H
inst✝¹ : OrderedCommGroup H
inst✝ : ContinuousInv H
a : H
⊢ Tendsto Inv.inv (𝓝[Ioi a⁻¹] a⁻¹) (𝓝[Iio a] a)
Theorem: LocalizedModule.lift_comp
File: Mathlib/Algebra/Module/LocalizedModule.lean

tactic: ext x
state_before: R : Type u_1
inst✝⁶ : CommRing R
S : Submonoid R
M : Type u_2
M' : Type ?u.554447
M'' : Type u_3
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid M'
inst✝³ : AddCommMonoid M''
inst✝² : Module R M
inst✝¹ : Module R M'
inst✝ : Module R M''
f : M →ₗ[R] M'
g✝ g : M →ₗ[R] M''
h : ∀ (x : { x // x ∈ S }), IsUnit (↑(algebraMap R (Module.End R M'')) ↑x)
⊢ LinearMap.comp (lift S g h) (mkLinearMap S M) = g

tactic: dsimp
state_before: case h
R : Type u_1
inst✝⁶ : CommRing R
S : Submonoid R
M : Type u_2
M' : Type ?u.554447
M'' : Type u_3
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid M'
inst✝³ : AddCommMonoid M''
inst✝² : Module R M
inst✝¹ : Module R M'
inst✝ : Module R M''
f : M →ₗ[R] M'
g✝ g : M →ₗ[R] M''
h : ∀ (x : { x // x ∈ S }), IsUnit (↑(algebraMap R (Module.End R M'')) ↑x)
x : M
⊢ ↑(LinearMap.comp (lift S g h) (mkLinearMap S M)) x = ↑g x

tactic: rw [LocalizedModule.lift_mk]
state_before: case h
R : Type u_1
inst✝⁶ : CommRing R
S : Submonoid R
M : Type u_2
M' : Type ?u.554447
M'' : Type u_3
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid M'
inst✝³ : AddCommMonoid M''
inst✝² : Module R M
inst✝¹ : Module R M'
inst✝ : Module R M''
f : M →ₗ[R] M'
g✝ g : M →ₗ[R] M''
h : ∀ (x : { x // x ∈ S }), IsUnit (↑(algebraMap R (Module.End R M'')) ↑x)
x : M
⊢ ↑(lift S g h) (mk x 1) = ↑g x

tactic: erw [Module.End_algebraMap_isUnit_inv_apply_eq_iff, one_smul]
state_before: case h
R : Type u_1
inst✝⁶ : CommRing R
S : Submonoid R
M : Type u_2
M' : Type ?u.554447
M'' : Type u_3
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid M'
inst✝³ : AddCommMonoid M''
inst✝² : Module R M
inst✝¹ : Module R M'
inst✝ : Module R M''
f : M →ₗ[R] M'
g✝ g : M →ₗ[R] M''
h : ∀ (x : { x // x ∈ S }), IsUnit (↑(algebraMap R (Module.End R M'')) ↑x)
x : M
⊢ ↑↑(IsUnit.unit (_ : IsUnit (↑(algebraMap R (Module.End R M'')) ↑1)))⁻¹ (↑g x) = ↑g x
Theorem: SimpleGraph.Walk.coe_support_append'
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: rw [support_append, ← Multiset.coe_add]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v w : V
p : Walk G u v
p' : Walk G v w
⊢ ↑(support (append p p')) = ↑(support p) + ↑(support p') - {v}

tactic: simp only [coe_support]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v w : V
p : Walk G u v
p' : Walk G v w
⊢ ↑(support p) + ↑(List.tail (support p')) = ↑(support p) + ↑(support p') - {v}

tactic: rw [add_comm ({v} : Multiset V)]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v w : V
p : Walk G u v
p' : Walk G v w
⊢ {u} + ↑(List.tail (support p)) + ↑(List.tail (support p')) =
    {u} + ↑(List.tail (support p)) + ({v} + ↑(List.tail (support p'))) - {v}

tactic: simp only [← add_assoc, add_tsub_cancel_right]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v w : V
p : Walk G u v
p' : Walk G v w
⊢ {u} + ↑(List.tail (support p)) + ↑(List.tail (support p')) =
    {u} + ↑(List.tail (support p)) + (↑(List.tail (support p')) + {v}) - {v}
Theorem: Dfinsupp.neLocus_sub_right
File: Mathlib/Data/Dfinsupp/NeLocus.lean

tactic: simpa only [sub_eq_add_neg] using @neLocus_add_right α N _ _ _ _ _ _
state_before: α : Type u_1
N : α → Type u_2
inst✝² : DecidableEq α
inst✝¹ : (a : α) → DecidableEq (N a)
inst✝ : (a : α) → AddGroup (N a)
f f₁ f₂ g g₁ g₂ : Π₀ (a : α), N a
⊢ neLocus (f₁ - g) (f₂ - g) = neLocus f₁ f₂
Theorem: Polynomial.trailingDegree_le_trailingDegree
File: Mathlib/Data/Polynomial/Degree/TrailingDegree.lean

tactic: by_cases hp : p = 0
state_before: R : Type u
S : Type v
a b : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
h : coeff q (natTrailingDegree p) ≠ 0
⊢ trailingDegree q ≤ trailingDegree p

tactic: rw [hp]
state_before: case pos
R : Type u
S : Type v
a b : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
h : coeff q (natTrailingDegree p) ≠ 0
hp : p = 0
⊢ trailingDegree q ≤ trailingDegree p

tactic: exact le_top
state_before: case pos
R : Type u
S : Type v
a b : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
h : coeff q (natTrailingDegree p) ≠ 0
hp : p = 0
⊢ trailingDegree q ≤ trailingDegree 0

tactic: rw [trailingDegree_eq_natTrailingDegree hp]
state_before: case neg
R : Type u
S : Type v
a b : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
h : coeff q (natTrailingDegree p) ≠ 0
hp : ¬p = 0
⊢ trailingDegree q ≤ trailingDegree p

tactic: exact le_trailingDegree_of_ne_zero h
state_before: case neg
R : Type u
S : Type v
a b : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
h : coeff q (natTrailingDegree p) ≠ 0
hp : ¬p = 0
⊢ trailingDegree q ≤ ↑(natTrailingDegree p)
Theorem: LucasLehmer.Int.coe_nat_pow_pred
File: Mathlib/NumberTheory/LucasLehmer.lean

tactic: have : 1 ≤ b ^ p := Nat.one_le_pow p b w
state_before: b p : ℕ
w : 0 < b
⊢ ↑(b ^ p - 1) = ↑b ^ p - 1

tactic: norm_cast
state_before: b p : ℕ
w : 0 < b
this : 1 ≤ b ^ p
⊢ ↑(b ^ p - 1) = ↑b ^ p - 1
Theorem: List.all_eq_not_any_not
File: Std/Data/List/Lemmas.lean

tactic: rw [Bool.eq_iff_iff]
state_before: α : Type u_1
l : List α
p : α → Bool
⊢ all l p = !any l fun c => !p c

tactic: simp
state_before: α : Type u_1
l : List α
p : α → Bool
⊢ all l p = true ↔ (!any l fun c => !p c) = true

tactic: rw [← Bool.not_eq_true, List.any_eq_true]
state_before: α : Type u_1
l : List α
p : α → Bool
⊢ (∀ (x : α), x ∈ l → p x = true) ↔ (any l fun c => !p c) = false

tactic: simp
state_before: α : Type u_1
l : List α
p : α → Bool
⊢ (∀ (x : α), x ∈ l → p x = true) ↔ ¬∃ x, x ∈ l ∧ (!p x) = true
Theorem: sub_half
File: Mathlib/Algebra/CharZero/Lemmas.lean

tactic: rw [sub_eq_iff_eq_add, add_halves']
state_before: R : Type u_1
inst✝¹ : DivisionRing R
inst✝ : CharZero R
a : R
⊢ a - a / 2 = a / 2
Theorem: Ordinal.card_nat
File: Mathlib/SetTheory/Ordinal/Basic.lean

tactic: induction n <;> [rfl; simp only [card_add, card_one, Nat.cast_succ, *]]
state_before: α : Type ?u.137562
β : Type ?u.137565
γ : Type ?u.137568
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
n : ℕ
⊢ card ↑n = ↑n
Theorem: List.nil_union
File: Std/Data/List/Lemmas.lean

tactic: simp [List.union, foldr]
state_before: α : Type u_1
inst✝ : DecidableEq α
l : List α
⊢ List.union [] l = l
Theorem: Measurable.piecewise
File: Mathlib/MeasureTheory/MeasurableSpace.lean

tactic: intro t ht
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.43295
δ : Type ?u.43298
δ' : Type ?u.43301
ι : Sort uι
s t u : Set α
f g : α → β
m : MeasurableSpace α
mβ : MeasurableSpace β
x✝ : DecidablePred fun x => x ∈ s
hs : MeasurableSet s
hf : Measurable f
hg : Measurable g
⊢ Measurable (piecewise s f g)

tactic: rw [piecewise_preimage]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.43295
δ : Type ?u.43298
δ' : Type ?u.43301
ι : Sort uι
s t✝ u : Set α
f g : α → β
m : MeasurableSpace α
mβ : MeasurableSpace β
x✝ : DecidablePred fun x => x ∈ s
hs : MeasurableSet s
hf : Measurable f
hg : Measurable g
t : Set β
ht : MeasurableSet t
⊢ MeasurableSet (piecewise s f g ⁻¹' t)

tactic: exact hs.ite (hf ht) (hg ht)
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.43295
δ : Type ?u.43298
δ' : Type ?u.43301
ι : Sort uι
s t✝ u : Set α
f g : α → β
m : MeasurableSpace α
mβ : MeasurableSpace β
x✝ : DecidablePred fun x => x ∈ s
hs : MeasurableSet s
hf : Measurable f
hg : Measurable g
t : Set β
ht : MeasurableSet t
⊢ MeasurableSet (Set.ite s (f ⁻¹' t) (g ⁻¹' t))
Theorem: Polynomial.isPrimitive_primPart
File: Mathlib/RingTheory/Polynomial/Content.lean

tactic: by_cases h : p = 0
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
⊢ IsPrimitive (primPart p)

tactic: rw [← content_eq_zero_iff] at h
state_before: case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
h : ¬p = 0
⊢ IsPrimitive (primPart p)

tactic: rw [isPrimitive_iff_content_eq_one]
state_before: case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
h✝ : ¬p = 0
h : ¬content p = 0
⊢ IsPrimitive (primPart p)

tactic: apply mul_left_cancel₀ h
state_before: case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
h✝ : ¬p = 0
h : ¬content p = 0
⊢ content (primPart p) = 1

tactic: conv_rhs => rw [p.eq_C_content_mul_primPart, mul_one, content_C_mul, normalize_content]
state_before: case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
h✝ : ¬p = 0
h : ¬content p = 0
⊢ content p * content (primPart p) = content p * 1

tactic: simp [h]
state_before: case pos
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
h : p = 0
⊢ IsPrimitive (primPart p)
Theorem: Lagrange.eval_basisDivisor_right
File: Mathlib/LinearAlgebra/Lagrange.lean

tactic: simp only [basisDivisor, eval_mul, eval_C, eval_sub, eval_X, sub_self, MulZeroClass.mul_zero]
state_before: F : Type u_1
inst✝ : Field F
x y : F
⊢ eval y (basisDivisor x y) = 0
Theorem: EMetric.le_infEdist
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: simp only [infEdist, le_iInf_iff]
state_before: ι : Sort ?u.793
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t : Set α
Φ : α → β
d : ℝ≥0∞
⊢ d ≤ infEdist x s ↔ ∀ (y : α), y ∈ s → d ≤ edist x y
Theorem: Nat.gcd_self
File: src/lean/Init/Data/Nat/Gcd.lean

tactic: cases n <;> simp [gcd_succ]
state_before: n : Nat
⊢ gcd n n = n
Theorem: Filter.EventuallyLE.sup
File: Mathlib/Order/Filter/Basic.lean

tactic: filter_upwards [hf, hg] with x hfx hgx using sup_le_sup hfx hgx
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.216914
ι : Sort x
inst✝ : SemilatticeSup β
l : Filter α
f₁ f₂ g₁ g₂ : α → β
hf : f₁ ≤ᶠ[l] f₂
hg : g₁ ≤ᶠ[l] g₂
⊢ f₁ ⊔ g₁ ≤ᶠ[l] f₂ ⊔ g₂
Theorem: Part.to_ofOption
File: Mathlib/Data/Part.lean

tactic: cases o <;> rfl
state_before: α : Type u_1
β : Type ?u.11305
γ : Type ?u.11308
o : Option α
⊢ toOption ↑o = o
Theorem: Finset.ssubset_iff_exists_subset_erase
File: Mathlib/Data/Finset/Basic.lean

tactic: refine' ⟨fun h => _, fun ⟨a, ha, h⟩ => ssubset_of_subset_of_ssubset h <| erase_ssubset ha⟩
state_before: α : Type u_1
β : Type ?u.214645
γ : Type ?u.214648
inst✝ : DecidableEq α
s✝ t✝ u v : Finset α
a b : α
s t : Finset α
⊢ s ⊂ t ↔ ∃ a, a ∈ t ∧ s ⊆ erase t a

tactic: obtain ⟨a, ht, hs⟩ := not_subset.1 h.2
state_before: α : Type u_1
β : Type ?u.214645
γ : Type ?u.214648
inst✝ : DecidableEq α
s✝ t✝ u v : Finset α
a b : α
s t : Finset α
h : s ⊂ t
⊢ ∃ a, a ∈ t ∧ s ⊆ erase t a

tactic: exact ⟨a, ht, subset_erase.2 ⟨h.1, hs⟩⟩
state_before: case intro.intro
α : Type u_1
β : Type ?u.214645
γ : Type ?u.214648
inst✝ : DecidableEq α
s✝ t✝ u v : Finset α
a✝ b : α
s t : Finset α
h : s ⊂ t
a : α
ht : a ∈ t
hs : ¬a ∈ s
⊢ ∃ a, a ∈ t ∧ s ⊆ erase t a
Theorem: Real.Icc_mem_vitaliFamily_at_left
File: Mathlib/MeasureTheory/Covering/OneDim.lean

tactic: rw [Icc_eq_closedBall]
state_before: x y : ℝ
hxy : x < y
⊢ Icc x y ∈ VitaliFamily.setsAt (vitaliFamily volume 1) y

tactic: refine' closedBall_mem_vitaliFamily_of_dist_le_mul _ _ (by linarith)
state_before: x y : ℝ
hxy : x < y
⊢ Metric.closedBall ((x + y) / 2) ((y - x) / 2) ∈ VitaliFamily.setsAt (vitaliFamily volume 1) y

tactic: rw [Real.dist_eq, abs_of_nonneg] <;> linarith
state_before: x y : ℝ
hxy : x < y
⊢ dist y ((x + y) / 2) ≤ 1 * ((y - x) / 2)

tactic: linarith
state_before: x y : ℝ
hxy : x < y
⊢ 0 < (y - x) / 2