tasksource/leandojo huggingface dataset:
Theorem: IsCompact.finite_of_discrete
File: Mathlib/Topology/SubsetProperties.lean

tactic: have : ∀ x : α, ({x} : Set α) ∈ 𝓝 x := by simp [nhds_discrete]
state_before: α : Type u
β : Type v
ι : Type ?u.33227
π : ι → Type ?u.33232
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
s✝ t : Set α
inst✝ : DiscreteTopology α
s : Set α
hs : IsCompact s
⊢ Set.Finite s

tactic: rcases hs.elim_nhds_subcover (fun x => {x}) fun x _ => this x with ⟨t, _, hst⟩
state_before: α : Type u
β : Type v
ι : Type ?u.33227
π : ι → Type ?u.33232
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
s✝ t : Set α
inst✝ : DiscreteTopology α
s : Set α
hs : IsCompact s
this : ∀ (x : α), {x} ∈ 𝓝 x
⊢ Set.Finite s

tactic: simp only [← t.set_biUnion_coe, biUnion_of_singleton] at hst
state_before: case intro.intro
α : Type u
β : Type v
ι : Type ?u.33227
π : ι → Type ?u.33232
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
s✝ t✝ : Set α
inst✝ : DiscreteTopology α
s : Set α
hs : IsCompact s
this : ∀ (x : α), {x} ∈ 𝓝 x
t : Finset α
left✝ : ∀ (x : α), x ∈ t → x ∈ s
hst : s ⊆ ⋃ (x : α) (_ : x ∈ t), {x}
⊢ Set.Finite s

tactic: exact t.finite_toSet.subset hst
state_before: case intro.intro
α : Type u
β : Type v
ι : Type ?u.33227
π : ι → Type ?u.33232
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
s✝ t✝ : Set α
inst✝ : DiscreteTopology α
s : Set α
hs : IsCompact s
this : ∀ (x : α), {x} ∈ 𝓝 x
t : Finset α
left✝ : ∀ (x : α), x ∈ t → x ∈ s
hst : s ⊆ ↑t
⊢ Set.Finite s

tactic: simp [nhds_discrete]
state_before: α : Type u
β : Type v
ι : Type ?u.33227
π : ι → Type ?u.33232
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
s✝ t : Set α
inst✝ : DiscreteTopology α
s : Set α
hs : IsCompact s
⊢ ∀ (x : α), {x} ∈ 𝓝 x
Theorem: Asymptotics.isBigO_pi
File: Mathlib/Analysis/Asymptotics/Asymptotics.lean

tactic: simp only [isBigO_iff_eventually_isBigOWith, ← eventually_all]
state_before: α : Type u_3
β : Type ?u.694033
E : Type ?u.694036
F : Type ?u.694039
G : Type ?u.694042
E'✝ : Type ?u.694045
F' : Type u_4
G' : Type ?u.694051
E'' : Type ?u.694054
F'' : Type ?u.694057
G'' : Type ?u.694060
R : Type ?u.694063
R' : Type ?u.694066
𝕜 : Type ?u.694069
𝕜' : Type ?u.694072
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''
k'' : α → G''
l l' : Filter α
ι : Type u_1
inst✝¹ : Fintype ι
E' : ι → Type u_2
inst✝ : (i : ι) → NormedAddCommGroup (E' i)
f : α → (i : ι) → E' i
⊢ f =O[l] g' ↔ ∀ (i : ι), (fun x => f x i) =O[l] g'

tactic: exact eventually_congr (eventually_atTop.2 ⟨0, fun c => isBigOWith_pi⟩)
state_before: α : Type u_3
β : Type ?u.694033
E : Type ?u.694036
F : Type ?u.694039
G : Type ?u.694042
E'✝ : Type ?u.694045
F' : Type u_4
G' : Type ?u.694051
E'' : Type ?u.694054
F'' : Type ?u.694057
G'' : Type ?u.694060
R : Type ?u.694063
R' : Type ?u.694066
𝕜 : Type ?u.694069
𝕜' : Type ?u.694072
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''
k'' : α → G''
l l' : Filter α
ι : Type u_1
inst✝¹ : Fintype ι
E' : ι → Type u_2
inst✝ : (i : ι) → NormedAddCommGroup (E' i)
f : α → (i : ι) → E' i
⊢ (∀ᶠ (c : ℝ) in atTop, IsBigOWith c l f g') ↔ ∀ᶠ (x : ℝ) in atTop, ∀ (i : ι), IsBigOWith x l (fun x => f x i) g'
Theorem: FirstOrder.Language.Term.realize_functions_apply₂
File: Mathlib/ModelTheory/Semantics.lean

tactic: rw [Functions.apply₂, Term.realize]
state_before: L : Language
L' : Language
M : Type w
N : Type ?u.6618
P : Type ?u.6621
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
f : Functions L 2
t₁ t₂ : Term L α
v : α → M
⊢ realize v (Functions.apply₂ f t₁ t₂) = funMap f ![realize v t₁, realize v t₂]

tactic: refine' congr rfl (funext (Fin.cases _ _))
state_before: L : Language
L' : Language
M : Type w
N : Type ?u.6618
P : Type ?u.6621
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
f : Functions L 2
t₁ t₂ : Term L α
v : α → M
⊢ (funMap f fun i => realize v (Matrix.vecCons t₁ ![t₂] i)) = funMap f ![realize v t₁, realize v t₂]

tactic: simp only [Matrix.cons_val_zero]
state_before: case refine'_1
L : Language
L' : Language
M : Type w
N : Type ?u.6618
P : Type ?u.6621
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
f : Functions L 2
t₁ t₂ : Term L α
v : α → M
⊢ realize v (Matrix.vecCons t₁ ![t₂] 0) = Matrix.vecCons (realize v t₁) ![realize v t₂] 0

tactic: simp only [Matrix.cons_val_succ, Matrix.cons_val_fin_one, forall_const]
state_before: case refine'_2
L : Language
L' : Language
M : Type w
N : Type ?u.6618
P : Type ?u.6621
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
f : Functions L 2
t₁ t₂ : Term L α
v : α → M
⊢ ∀ (i : Fin 1), realize v (Matrix.vecCons t₁ ![t₂] (succ i)) = Matrix.vecCons (realize v t₁) ![realize v t₂] (succ i)
Theorem: LinearMap.toMatrix_algebraMap
File: Mathlib/LinearAlgebra/Matrix/ToLin.lean

tactic: simp [Module.algebraMap_end_eq_smul_id, LinearMap.toMatrix_id]
state_before: R : Type u_1
inst✝⁹ : CommSemiring R
l : Type ?u.1950598
m : Type ?u.1950601
n : Type u_2
inst✝⁸ : Fintype n
inst✝⁷ : Fintype m
inst✝⁶ : DecidableEq n
M₁ : Type u_3
M₂ : Type ?u.1950625
inst✝⁵ : AddCommMonoid M₁
inst✝⁴ : AddCommMonoid M₂
inst✝³ : Module R M₁
inst✝² : Module R M₂
v₁ : Basis n R M₁
v₂ : Basis m R M₂
M₃ : Type ?u.1951127
inst✝¹ : AddCommMonoid M₃
inst✝ : Module R M₃
v₃ : Basis l R M₃
x : R
⊢ ↑(toMatrix v₁ v₁) (↑(algebraMap R (Module.End R M₁)) x) = ↑(scalar n) x
Theorem: Nat.zero_ascFactorial
File: Mathlib/Data/Nat/Factorial/Basic.lean

tactic: induction' k with t ht
state_before: k : ℕ
⊢ ascFactorial 0 k = k !

tactic: rw [ascFactorial, ht, zero_add, Nat.factorial_succ]
state_before: case succ
t : ℕ
ht : ascFactorial 0 t = t !
⊢ ascFactorial 0 (succ t) = (succ t)!

tactic: rfl
state_before: case zero

⊢ ascFactorial 0 zero = zero !
Theorem: FractionalIdeal.eq_zero_iff
File: Mathlib/RingTheory/FractionalIdeal.lean

tactic: simpa [h, mem_zero_iff] using hx
state_before: R : Type u_1
inst✝² : CommRing R
S : Submonoid R
P : Type u_2
inst✝¹ : CommRing P
inst✝ : Algebra R P
loc : IsLocalization S P
I : FractionalIdeal S P
h : I = 0
x : P
hx : x ∈ I
⊢ x = 0
Theorem: AddCircle.norm_le_half_period
File: Mathlib/Analysis/Normed/Group/AddCircle.lean

tactic: obtain ⟨x⟩ := x
state_before: p : ℝ
x : AddCircle p
hp : p ≠ 0
⊢ ‖x‖ ≤ abs p / 2

tactic: change ‖(x : AddCircle p)‖ ≤ |p| / 2
state_before: case mk
p : ℝ
x✝ : AddCircle p
hp : p ≠ 0
x : ℝ
⊢ ‖Quot.mk Setoid.r x‖ ≤ abs p / 2

tactic: rw [norm_eq, ← mul_le_mul_left (abs_pos.mpr (inv_ne_zero hp)), ← abs_mul, mul_sub, mul_left_comm,
  ← mul_div_assoc, ← abs_mul, inv_mul_cancel hp, mul_one, abs_one]
state_before: case mk
p : ℝ
x✝ : AddCircle p
hp : p ≠ 0
x : ℝ
⊢ ‖↑x‖ ≤ abs p / 2

tactic: exact abs_sub_round (p⁻¹ * x)
state_before: case mk
p : ℝ
x✝ : AddCircle p
hp : p ≠ 0
x : ℝ
⊢ abs (p⁻¹ * x - ↑(round (p⁻¹ * x))) ≤ 1 / 2
Theorem: Multiset.ext
File: Mathlib/Data/Multiset/Basic.lean

tactic: simp only [quot_mk_to_coe, coe_filter, mem_coe, coe_count, decide_eq_true_eq]
state_before: α : Type u_1
β : Type ?u.399080
γ : Type ?u.399083
inst✝ : DecidableEq α
s t : Multiset α
_l₁ _l₂ : List α
⊢ _l₁ ≈ _l₂ ↔ ∀ (a : α), count a (Quotient.mk (isSetoid α) _l₁) = count a (Quotient.mk (isSetoid α) _l₂)

tactic: apply perm_iff_count
state_before: α : Type u_1
β : Type ?u.399080
γ : Type ?u.399083
inst✝ : DecidableEq α
s t : Multiset α
_l₁ _l₂ : List α
⊢ _l₁ ≈ _l₂ ↔ ∀ (a : α), List.count a _l₁ = List.count a _l₂
Theorem: Equiv.Perm.Disjoint.inv_left
File: Mathlib/GroupTheory/Perm/Support.lean

tactic: intro x
state_before: α : Type u_1
f g h✝ : Perm α
h : Disjoint f g
⊢ Disjoint f⁻¹ g

tactic: rw [inv_eq_iff_eq, eq_comm]
state_before: α : Type u_1
f g h✝ : Perm α
h : Disjoint f g
x : α
⊢ ↑f⁻¹ x = x ∨ ↑g x = x

tactic: exact h x
state_before: α : Type u_1
f g h✝ : Perm α
h : Disjoint f g
x : α
⊢ ↑f x = x ∨ ↑g x = x
Theorem: NFA.evalFrom_append_singleton
File: Mathlib/Computability/NFA.lean

tactic: simp only [evalFrom, List.foldl_append, List.foldl_cons, List.foldl_nil]
state_before: α : Type u
σ σ' : Type v
M : NFA α σ
S : Set σ
x : List α
a : α
⊢ evalFrom M S (x ++ [a]) = stepSet M (evalFrom M S x) a
Theorem: Metric.diam_pair
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: simp only [diam, EMetric.diam_pair, dist_edist]
state_before: α : Type u
β : Type v
X : Type ?u.529261
ι : Type ?u.529264
inst✝ : PseudoMetricSpace α
s : Set α
x y z : α
⊢ diam {x, y} = dist x y
Theorem: BoxIntegral.HasIntegral.smul
File: Mathlib/Analysis/BoxIntegral/Basic.lean

tactic: simpa only [HasIntegral, ← integralSum_smul] using
  (tendsto_const_nhds : Tendsto _ _ (𝓝 c)).smul hf
state_before: ι : Type u
E : Type v
F : Type w
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
I J : Box ι
π : TaggedPrepartition I
inst✝ : Fintype ι
l : IntegrationParams
f g : (ι → ℝ) → E
vol : ι →ᵇᵃ[⊤] E →L[ℝ] F
y y' : F
hf : HasIntegral I l f vol y
c : ℝ
⊢ HasIntegral I l (c • f) vol (c • y)
Theorem: LinearEquiv.conj_id
File: Mathlib/LinearAlgebra/Basic.lean

tactic: ext
state_before: R : Type u_1
R₁ : Type ?u.2212288
R₂ : Type ?u.2212291
R₃ : Type ?u.2212294
R₄ : Type ?u.2212297
S : Type ?u.2212300
K : Type ?u.2212303
K₂ : Type ?u.2212306
M : Type u_2
M' : Type ?u.2212312
M₁ : Type ?u.2212315
M₂ : Type u_3
M₃ : Type ?u.2212321
M₄ : Type ?u.2212324
N : Type ?u.2212327
N₂ : Type ?u.2212330
ι : Type ?u.2212333
V : Type ?u.2212336
V₂ : Type ?u.2212339
inst✝⁶ : CommSemiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid M₂
inst✝³ : AddCommMonoid M₃
inst✝² : Module R M
inst✝¹ : Module R M₂
inst✝ : Module R M₃
e : M ≃ₗ[R] M₂
⊢ ↑(conj e) LinearMap.id = LinearMap.id

tactic: simp [conj_apply]
state_before: case h
R : Type u_1
R₁ : Type ?u.2212288
R₂ : Type ?u.2212291
R₃ : Type ?u.2212294
R₄ : Type ?u.2212297
S : Type ?u.2212300
K : Type ?u.2212303
K₂ : Type ?u.2212306
M : Type u_2
M' : Type ?u.2212312
M₁ : Type ?u.2212315
M₂ : Type u_3
M₃ : Type ?u.2212321
M₄ : Type ?u.2212324
N : Type ?u.2212327
N₂ : Type ?u.2212330
ι : Type ?u.2212333
V : Type ?u.2212336
V₂ : Type ?u.2212339
inst✝⁶ : CommSemiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid M₂
inst✝³ : AddCommMonoid M₃
inst✝² : Module R M
inst✝¹ : Module R M₂
inst✝ : Module R M₃
e : M ≃ₗ[R] M₂
x✝ : M₂
⊢ ↑(↑(conj e) LinearMap.id) x✝ = ↑LinearMap.id x✝
Theorem: Filter.lift'_iInf
File: Mathlib/Order/Filter/Lift.lean

tactic: simp only [inf_principal, comp, hg]
state_before: α : Type u_2
β : Type u_3
γ : Type ?u.43313
ι : Sort u_1
f✝ f₁ f₂ : Filter α
h h₁ h₂ : Set α → Set β
inst✝ : Nonempty ι
f : ι → Filter α
g : Set α → Set β
hg : ∀ (s t : Set α), g (s ∩ t) = g s ∩ g t
s t : Set α
⊢ (𝓟 ∘ g) (s ∩ t) = (𝓟 ∘ g) s ⊓ (𝓟 ∘ g) t
Theorem: Matrix.cramer_zero
File: Mathlib/LinearAlgebra/Matrix/Adjugate.lean

tactic: ext (i j)
state_before: m : Type u
n : Type v
α : Type w
inst✝⁵ : DecidableEq n
inst✝⁴ : Fintype n
inst✝³ : DecidableEq m
inst✝² : Fintype m
inst✝¹ : CommRing α
A : Matrix n n α
b : n → α
inst✝ : Nontrivial n
⊢ cramer 0 = 0

tactic: obtain ⟨j', hj'⟩ : ∃ j', j' ≠ j := exists_ne j
state_before: case h.h.h
m : Type u
n : Type v
α : Type w
inst✝⁵ : DecidableEq n
inst✝⁴ : Fintype n
inst✝³ : DecidableEq m
inst✝² : Fintype m
inst✝¹ : CommRing α
A : Matrix n n α
b : n → α
inst✝ : Nontrivial n
i j : n
⊢ ↑(LinearMap.comp (cramer 0) (LinearMap.single i)) 1 j = ↑(LinearMap.comp 0 (LinearMap.single i)) 1 j

tactic: apply det_eq_zero_of_column_eq_zero j'
state_before: case h.h.h.intro
m : Type u
n : Type v
α : Type w
inst✝⁵ : DecidableEq n
inst✝⁴ : Fintype n
inst✝³ : DecidableEq m
inst✝² : Fintype m
inst✝¹ : CommRing α
A : Matrix n n α
b : n → α
inst✝ : Nontrivial n
i j j' : n
hj' : j' ≠ j
⊢ ↑(LinearMap.comp (cramer 0) (LinearMap.single i)) 1 j = ↑(LinearMap.comp 0 (LinearMap.single i)) 1 j

tactic: intro j''
state_before: case h.h.h.intro
m : Type u
n : Type v
α : Type w
inst✝⁵ : DecidableEq n
inst✝⁴ : Fintype n
inst✝³ : DecidableEq m
inst✝² : Fintype m
inst✝¹ : CommRing α
A : Matrix n n α
b : n → α
inst✝ : Nontrivial n
i j j' : n
hj' : j' ≠ j
⊢ ∀ (i_1 : n), updateColumn 0 j (↑(LinearMap.single i) 1) i_1 j' = 0

tactic: simp [updateColumn_ne hj']
state_before: case h.h.h.intro
m : Type u
n : Type v
α : Type w
inst✝⁵ : DecidableEq n
inst✝⁴ : Fintype n
inst✝³ : DecidableEq m
inst✝² : Fintype m
inst✝¹ : CommRing α
A : Matrix n n α
b : n → α
inst✝ : Nontrivial n
i j j' : n
hj' : j' ≠ j
j'' : n
⊢ updateColumn 0 j (↑(LinearMap.single i) 1) j'' j' = 0
Theorem: FreeGroup.Red.Step.not_rev
File: Mathlib/GroupTheory/FreeGroup.lean

tactic: cases b <;> exact Step.not
state_before: α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
x : α
b : Bool
⊢ Step (L₁ ++ (x, !b) :: (x, b) :: L₂) (L₁ ++ L₂)
Theorem: Nat.unpair_left_le
File: Mathlib/Data/Nat/Pairing.lean

tactic: simp
state_before: ⊢ (unpair 0).fst ≤ 0
Theorem: LocalizedModule.add_comm'
File: Mathlib/Algebra/Module/LocalizedModule.lean

tactic: rw [mk_add_mk, mk_add_mk, add_comm, mul_comm]
state_before: R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
x y : LocalizedModule S M
m m' : M
s s' : { x // x ∈ S }
⊢ mk m s + mk m' s' = mk m' s' + mk m s
Theorem: Matrix.smul_dotProduct
File: Mathlib/Data/Matrix/Basic.lean

tactic: simp [dotProduct, Finset.smul_sum, smul_mul_assoc]
state_before: l : Type ?u.184568
m : Type u_2
n : Type ?u.184574
o : Type ?u.184577
m' : o → Type ?u.184582
n' : o → Type ?u.184587
R : Type u_1
S : Type ?u.184593
α : Type v
β : Type w
γ : Type ?u.184600
inst✝⁶ : Fintype m
inst✝⁵ : Fintype n
inst✝⁴ : Monoid R
inst✝³ : Mul α
inst✝² : AddCommMonoid α
inst✝¹ : DistribMulAction R α
inst✝ : IsScalarTower R α α
x : R
v w : m → α
⊢ x • v ⬝ᵥ w = x • (v ⬝ᵥ w)
Theorem: Ordinal.blsub_type
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: rw [blsub_le_iff, lsub_le_iff]
state_before: α✝ : Type ?u.358821
β : Type ?u.358824
γ : Type ?u.358827
r✝ : α✝ → α✝ → Prop
s : β → β → Prop
t : γ → γ → Prop
α : Type u
r : α → α → Prop
inst✝ : IsWellOrder α r
f : (a : Ordinal) → a < type r → Ordinal
o : Ordinal
⊢ blsub (type r) f ≤ o ↔ (lsub fun a => f (typein r a) (_ : typein r a < type r)) ≤ o

tactic: exact ⟨fun H b => H _ _, fun H i h => by simpa only [typein_enum] using H (enum r i h)⟩
state_before: α✝ : Type ?u.358821
β : Type ?u.358824
γ : Type ?u.358827
r✝ : α✝ → α✝ → Prop
s : β → β → Prop
t : γ → γ → Prop
α : Type u
r : α → α → Prop
inst✝ : IsWellOrder α r
f : (a : Ordinal) → a < type r → Ordinal
o : Ordinal
⊢ (∀ (i : Ordinal) (h : i < type r), f i h < o) ↔ ∀ (i : α), f (typein r i) (_ : typein r i < type r) < o

tactic: simpa only [typein_enum] using H (enum r i h)
state_before: α✝ : Type ?u.358821
β : Type ?u.358824
γ : Type ?u.358827
r✝ : α✝ → α✝ → Prop
s : β → β → Prop
t : γ → γ → Prop
α : Type u
r : α → α → Prop
inst✝ : IsWellOrder α r
f : (a : Ordinal) → a < type r → Ordinal
o : Ordinal
H : ∀ (i : α), f (typein r i) (_ : typein r i < type r) < o
i : Ordinal
h : i < type r
⊢ f i h < o
Theorem: List.eraseP_eq_erasePTR
File: Std/Data/List/Basic.lean

tactic: funext α p l
state_before: ⊢ @eraseP = @erasePTR

tactic: simp [erasePTR]
state_before: case h.h.h
α : Type u_1
p : α → Bool
l : List α
⊢ eraseP p l = erasePTR p l

tactic: exact (go #[] _ rfl).symm
state_before: case h.h.h
α : Type u_1
p : α → Bool
l : List α
⊢ eraseP p l = erasePTR.go p l l #[]

tactic: simp [erasePTR.go, eraseP, h]
state_before: α : Type u_1
p : α → Bool
l : List α
acc : Array α
h : l = acc.data ++ []
⊢ erasePTR.go p l [] acc = acc.data ++ eraseP p []

tactic: simp [erasePTR.go, eraseP]
state_before: α : Type u_1
p : α → Bool
l : List α
acc : Array α
x : α
xs : List α
⊢ l = acc.data ++ x :: xs → erasePTR.go p l (x :: xs) acc = acc.data ++ eraseP p (x :: xs)

tactic: cases p x <;> simp
state_before: α : Type u_1
p : α → Bool
l : List α
acc : Array α
x : α
xs : List α
⊢ l = acc.data ++ x :: xs →
    (bif p x then acc.data ++ xs else erasePTR.go p l xs (Array.push acc x)) =
      acc.data ++ bif p x then xs else x :: eraseP p xs

tactic: intro h
state_before: case false
α : Type u_1
p : α → Bool
l : List α
acc : Array α
x : α
xs : List α
⊢ l = acc.data ++ x :: xs → erasePTR.go p l xs (Array.push acc x) = acc.data ++ x :: eraseP p xs

tactic: rw [go _ xs]
state_before: case false
α : Type u_1
p : α → Bool
l : List α
acc : Array α
x : α
xs : List α
h : l = acc.data ++ x :: xs
⊢ erasePTR.go p l xs (Array.push acc x) = acc.data ++ x :: eraseP p xs

tactic: {simp}
state_before: case false
α : Type u_1
p : α → Bool
l : List α
acc : Array α
x : α
xs : List α
h : l = acc.data ++ x :: xs
⊢ (Array.push acc x).data ++ eraseP p xs = acc.data ++ x :: eraseP p xs

case false
α : Type u_1
p : α → Bool
l : List α
acc : Array α
x : α
xs : List α
h : l = acc.data ++ x :: xs
⊢ l = (Array.push acc x).data ++ xs

tactic: simp [h]
state_before: case false
α : Type u_1
p : α → Bool
l : List α
acc : Array α
x : α
xs : List α
h : l = acc.data ++ x :: xs
⊢ l = (Array.push acc x).data ++ xs
Theorem: ClosureOperator.closure_le_closed_iff_le
File: Mathlib/Order/Closure.lean

tactic: rw [← c.closure_eq_self_of_mem_closed hy, ← le_closure_iff]
state_before: α : Type u_1
ι : Sort ?u.5784
κ : ι → Sort ?u.5789
inst✝¹ inst✝ : PartialOrder α
c : ClosureOperator α
x y : α
hy : closed c y
⊢ ↑c.toOrderHom x ≤ y ↔ x ≤ y
Theorem: Complex.cosh_conj
File: Mathlib/Data/Complex/Exponential.lean

tactic: rw [cosh, ← RingHom.map_neg, exp_conj, exp_conj, ← RingHom.map_add, cosh, map_div₀]
state_before: x y : ℂ
⊢ cosh (↑(starRingEnd ℂ) x) = ↑(starRingEnd ℂ) (cosh x)

tactic: simp [← one_add_one_eq_two]
state_before: x y : ℂ
⊢ ↑(starRingEnd ℂ) (exp x + exp (-x)) / 2 = ↑(starRingEnd ℂ) (exp x + exp (-x)) / ↑(starRingEnd ℂ) 2
Theorem: Matrix.BlockTriangular.add
File: Mathlib/LinearAlgebra/Matrix/Block.lean

tactic: simp_rw [Matrix.add_apply, hM h, hN h, zero_add]
state_before: α : Type u_1
β : Type ?u.28972
m : Type u_2
n : Type ?u.28978
o : Type ?u.28981
m' : α → Type ?u.28986
n' : α → Type ?u.28991
R : Type v
inst✝¹ : CommRing R
M N : Matrix m m R
b : m → α
inst✝ : LT α
hM : BlockTriangular M b
hN : BlockTriangular N b
i j : m
h : b j < b i
⊢ (M + N) i j = 0
Theorem: continuousInv_inf
File: Mathlib/Topology/Algebra/Group/Basic.lean

tactic: rw [inf_eq_iInf]
state_before: α : Type u
β : Type v
G : Type w
H : Type x
ι' : Sort ?u.36534
inst✝ : Inv G
t₁ t₂ : TopologicalSpace G
h₁ : ContinuousInv G
h₂ : ContinuousInv G
⊢ ContinuousInv G

tactic: refine' continuousInv_iInf fun b => _
state_before: α : Type u
β : Type v
G : Type w
H : Type x
ι' : Sort ?u.36534
inst✝ : Inv G
t₁ t₂ : TopologicalSpace G
h₁ : ContinuousInv G
h₂ : ContinuousInv G
⊢ ContinuousInv G

tactic: cases b <;> assumption
state_before: α : Type u
β : Type v
G : Type w
H : Type x
ι' : Sort ?u.36534
inst✝ : Inv G
t₁ t₂ : TopologicalSpace G
h₁ : ContinuousInv G
h₂ : ContinuousInv G
b : Bool
⊢ ContinuousInv G
Theorem: PosNum.succ'_pred'
File: Mathlib/Data/Num/Lemmas.lean

tactic: rw [succ'_to_nat, pred'_to_nat, Nat.add_one, Nat.succ_pred_eq_of_pos (to_nat_pos _)]
state_before: α : Type ?u.327087
n : PosNum
⊢ ↑(succ' (pred' n)) = ↑n
Theorem: Filter.map_pure_prod
File: Mathlib/Order/Filter/Prod.lean

tactic: rw [Filter.pure_prod]
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.43964
ι : Sort ?u.43967
s : Set α
t : Set β
f✝ : Filter α
g : Filter β
f : α → β → γ
a : α
B : Filter β
⊢ map (Function.uncurry f) (pure a ×ˢ B) = map (f a) B

tactic: rfl
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.43964
ι : Sort ?u.43967
s : Set α
t : Set β
f✝ : Filter α
g : Filter β
f : α → β → γ
a : α
B : Filter β
⊢ map (Function.uncurry f) (map (Prod.mk a) B) = map (f a) B
Theorem: Real.sinh_eq
File: Mathlib/Data/Complex/Exponential.lean

tactic: simp [Complex.sinh]
state_before: x✝ y x : ℝ
⊢ ↑(sinh x) = ↑((exp x - exp (-x)) / 2)
Theorem: Set.image_const_sub_Icc
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: have := image_comp (fun x => a + x) fun x => -x
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
⊢ (fun x => a - x) '' Icc b c = Icc (a - c) (a - b)

tactic: dsimp [Function.comp] at this
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
this : ∀ (a_1 : Set α), ((fun x => a + x) ∘ fun x => -x) '' a_1 = (fun x => a + x) '' ((fun x => -x) '' a_1)
⊢ (fun x => a - x) '' Icc b c = Icc (a - c) (a - b)

tactic: simp [sub_eq_add_neg, this, add_comm]
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
this : ∀ (a_1 : Set α), (fun x => a + -x) '' a_1 = (fun x => a + x) '' ((fun x => -x) '' a_1)
⊢ (fun x => a - x) '' Icc b c = Icc (a - c) (a - b)
Theorem: Matrix.toLin'_mul_apply
File: Mathlib/LinearAlgebra/Matrix/ToLin.lean

tactic: rw [Matrix.toLin'_mul, LinearMap.comp_apply]
state_before: R : Type u_3
inst✝⁴ : CommSemiring R
k : Type ?u.691401
l : Type u_2
m : Type u_1
n : Type u_4
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : Fintype m
inst✝ : DecidableEq m
M : Matrix l m R
N : Matrix m n R
x : n → R
⊢ ↑(↑toLin' (M ⬝ N)) x = ↑(↑toLin' M) (↑(↑toLin' N) x)
Theorem: Filter.HasBasis.tendsto_iff
File: Mathlib/Order/Filter/Bases.lean

tactic: simp [hlb.tendsto_right_iff, hla.eventually_iff]
state_before: α : Type u_1
β : Type u_3
γ : Type ?u.70952
ι : Sort u_2
ι' : Sort u_4
la : Filter α
pa : ι → Prop
sa : ι → Set α
lb : Filter β
pb : ι' → Prop
sb : ι' → Set β
f : α → β
hla : HasBasis la pa sa
hlb : HasBasis lb pb sb
⊢ Tendsto f la lb ↔ ∀ (ib : ι'), pb ib → ∃ ia, pa ia ∧ ∀ (x : α), x ∈ sa ia → f x ∈ sb ib
Theorem: Nat.Partrec'.part_iff₁
File: Mathlib/Computability/Halting.lean

tactic: simp only [id.def, head_ofFn]
state_before: f : ℕ →. ℕ
h : _root_.Partrec fun v => f (Vector.head v)
v : ℕ
⊢ f (Vector.head (ofFn fun i => id v)) = f v
Theorem: List.rtakeWhile_eq_self_iff
File: Mathlib/Data/List/Rdrop.lean

tactic: simp [rtakeWhile, reverse_eq_iff]
state_before: α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ rtakeWhile p l = l ↔ ∀ (x : α), x ∈ l → p x = true
Theorem: List.All₂.imp
File: Mathlib/Data/List/Basic.lean

tactic: simp
state_before: ι : Type ?u.480589
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
p q : α → Prop
l✝ : List α
h : ∀ (x : α), p x → q x
x : α
l : List α
⊢ All₂ p (x :: l) → All₂ q (x :: l)

tactic: rw [←and_imp]
state_before: ι : Type ?u.480589
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
p q : α → Prop
l✝ : List α
h : ∀ (x : α), p x → q x
x : α
l : List α
⊢ p x → All₂ p l → q x ∧ All₂ q l

tactic: exact And.imp (h x) (All₂.imp h)
state_before: ι : Type ?u.480589
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
p q : α → Prop
l✝ : List α
h : ∀ (x : α), p x → q x
x : α
l : List α
⊢ p x ∧ All₂ p l → q x ∧ All₂ q l
Theorem: Set.Ici_diff_Ioi_same
File: Mathlib/Data/Set/Intervals/Basic.lean

tactic: rw [← Ici_diff_left, diff_diff_cancel_left (singleton_subset_iff.2 left_mem_Ici)]
state_before: α : Type u_1
β : Type ?u.45184
inst✝ : PartialOrder α
a b c : α
⊢ Ici a \ Ioi a = {a}
Theorem: integrableOn_Ioc_iff_integrableOn_Ioo
File: Mathlib/MeasureTheory/Integral/IntegrableOn.lean

tactic: rw [measure_singleton]
state_before: α : Type u_1
β : Type ?u.4340022
E : Type u_2
F : Type ?u.4340028
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
inst✝² : PartialOrder α
inst✝¹ : MeasurableSingletonClass α
f : α → E
μ : MeasureTheory.Measure α
a b : α
inst✝ : NoAtoms μ
⊢ ↑↑μ {b} ≠ ⊤

tactic: exact ENNReal.zero_ne_top
state_before: α : Type u_1
β : Type ?u.4340022
E : Type u_2
F : Type ?u.4340028
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
inst✝² : PartialOrder α
inst✝¹ : MeasurableSingletonClass α
f : α → E
μ : MeasureTheory.Measure α
a b : α
inst✝ : NoAtoms μ
⊢ 0 ≠ ⊤