tasksource/leandojo huggingface dataset:
Theorem: Set.diff_singleton_subset_iff
File: Mathlib/Data/Set/Basic.lean

tactic: rw [← union_singleton, union_comm]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t✝ t₁ t₂ u : Set α
x : α
s t : Set α
⊢ s \ {x} ⊆ t ↔ s ⊆ insert x t

tactic: apply diff_subset_iff
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t✝ t₁ t₂ u : Set α
x : α
s t : Set α
⊢ s \ {x} ⊆ t ↔ s ⊆ {x} ∪ t
Theorem: Nat.cast_floor_eq_int_floor
File: Mathlib/Algebra/Order/Floor.lean

tactic: rw [← Int.floor_toNat, Int.toNat_of_nonneg (Int.floor_nonneg.2 ha)]
state_before: F : Type ?u.309882
α : Type u_1
β : Type ?u.309888
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
a : α
ha : 0 ≤ a
⊢ ↑⌊a⌋₊ = ⌊a⌋
Theorem: List.eraseP_of_forall_not
File: Std/Data/List/Lemmas.lean

tactic: induction l with
| nil => rfl
| cons _ _ ih => simp [h _ (.head ..), ih (forall_mem_cons.1 h).2]
state_before: α : Type u_1
p : α → Bool
l : List α
h : ∀ (a : α), a ∈ l → ¬p a = true
⊢ eraseP p l = l

tactic: rfl
state_before: case nil
α : Type u_1
p : α → Bool
h : ∀ (a : α), a ∈ [] → ¬p a = true
⊢ eraseP p [] = []

tactic: simp [h _ (.head ..), ih (forall_mem_cons.1 h).2]
state_before: case cons
α : Type u_1
p : α → Bool
head✝ : α
tail✝ : List α
ih : (∀ (a : α), a ∈ tail✝ → ¬p a = true) → eraseP p tail✝ = tail✝
h : ∀ (a : α), a ∈ head✝ :: tail✝ → ¬p a = true
⊢ eraseP p (head✝ :: tail✝) = head✝ :: tail✝
Theorem: Polynomial.coeff_monomial
File: Mathlib/Data/Polynomial/Basic.lean

tactic: rw [← ofFinsupp_single]
state_before: R : Type u
a b : R
m n : ℕ
inst✝ : Semiring R
p q : R[X]
⊢ coeff (↑(monomial n) a) m = if n = m then a else 0

tactic: simp only [coeff, LinearMap.coe_mk]
state_before: R : Type u
a b : R
m n : ℕ
inst✝ : Semiring R
p q : R[X]
⊢ coeff { toFinsupp := Finsupp.single n a } m = if n = m then a else 0

tactic: rw [Finsupp.single_apply]
state_before: R : Type u
a b : R
m n : ℕ
inst✝ : Semiring R
p q : R[X]
⊢ ↑(Finsupp.single n a) m = if n = m then a else 0
Theorem: continuousAt_extChartAt'
File: Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean

tactic: rwa [← extChartAt_source I]
state_before: 𝕜 : Type u_3
E : Type u_2
M : Type u_1
H : Type u_4
E' : Type ?u.192175
M' : Type ?u.192178
H' : Type ?u.192181
inst✝¹⁰ : NontriviallyNormedField 𝕜
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : TopologicalSpace H
inst✝⁶ : TopologicalSpace M
f f' : LocalHomeomorph M H
I : ModelWithCorners 𝕜 E H
inst✝⁵ : NormedAddCommGroup E'
inst✝⁴ : NormedSpace 𝕜 E'
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
I' : ModelWithCorners 𝕜 E' H'
x : M
s t : Set M
inst✝¹ : ChartedSpace H M
inst✝ : ChartedSpace H' M'
x' : M
h : x' ∈ (extChartAt I x).source
⊢ x' ∈ (chartAt H x).toLocalEquiv.source
Theorem: Cardinal.sup_lt_ord_of_isRegular
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

tactic: rwa [hc.cof_eq]
state_before: α : Type ?u.158454
r : α → α → Prop
ι : Type (max u_1 u_2)
f : ι → Ordinal
c : Cardinal
hc : IsRegular c
hι : (#ι) < c
⊢ (#ι) < Ordinal.cof (ord c)
Theorem: Real.Angle.toReal_le_pi
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: induction θ using Real.Angle.induction_on
state_before: θ : Angle
⊢ toReal θ ≤ π

tactic: convert toIocMod_le_right two_pi_pos _ _
state_before: case h
x✝ : ℝ
⊢ toReal ↑x✝ ≤ π

tactic: ring
state_before: case h.e'_4
x✝ : ℝ
⊢ π = -π + 2 * π
Theorem: lt_of_mul_lt_mul_of_nonpos_right
File: Mathlib/Algebra/Order/Ring/Defs.lean

tactic: rwa [mul_neg, mul_neg, neg_lt_neg_iff]
state_before: α : Type u
β : Type ?u.200981
inst✝ : LinearOrderedRing α
a b c : α
h : a * c < b * c
hc : c ≤ 0
⊢ b * -c < a * -c
Theorem: contDiffOn_succ_iff_deriv_of_open
File: Mathlib/Analysis/Calculus/ContDiff.lean

tactic: rw [contDiffOn_succ_iff_derivWithin hs.uniqueDiffOn]
state_before: 𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
D : Type uD
inst✝⁹ : NormedAddCommGroup D
inst✝⁸ : NormedSpace 𝕜 D
E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type uF
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type uG
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
X : Type ?u.3014886
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f f₁ : E → F
g : F → G
x x₀ : E
c : F
b : E × F → G
m n✝ : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
f₂ : 𝕜 → F
s₂ : Set 𝕜
n : ℕ
hs : IsOpen s₂
⊢ ContDiffOn 𝕜 (↑(n + 1)) f₂ s₂ ↔ DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 (↑n) (deriv f₂) s₂

tactic: exact Iff.rfl.and (contDiffOn_congr fun _ => derivWithin_of_open hs)
state_before: 𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
D : Type uD
inst✝⁹ : NormedAddCommGroup D
inst✝⁸ : NormedSpace 𝕜 D
E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type uF
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type uG
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
X : Type ?u.3014886
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f f₁ : E → F
g : F → G
x x₀ : E
c : F
b : E × F → G
m n✝ : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
f₂ : 𝕜 → F
s₂ : Set 𝕜
n : ℕ
hs : IsOpen s₂
⊢ DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 (↑n) (derivWithin f₂ s₂) s₂ ↔
    DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 (↑n) (deriv f₂) s₂
Theorem: Rat.floor_cast
File: Mathlib/Data/Rat/Floor.lean

tactic: exact_mod_cast floor_eq_iff.1 (Eq.refl ⌊x⌋)
state_before: α : Type u_1
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
x : ℚ
⊢ ↑⌊x⌋ ≤ ↑x ∧ ↑x < ↑⌊x⌋ + 1
Theorem: Submodule.orthogonal_eq_bot_iff
File: Mathlib/Analysis/InnerProductSpace/Projection.lean

tactic: refine' ⟨_, fun h => by rw [h, Submodule.top_orthogonal_eq_bot]⟩
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.794030
inst✝⁵ : IsROrC 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : CompleteSpace ↑↑K
⊢ Kᗮ = ⊥ ↔ K = ⊤

tactic: intro h
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.794030
inst✝⁵ : IsROrC 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : CompleteSpace ↑↑K
⊢ Kᗮ = ⊥ → K = ⊤

tactic: have : K ⊔ Kᗮ = ⊤ := Submodule.sup_orthogonal_of_completeSpace
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.794030
inst✝⁵ : IsROrC 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : CompleteSpace ↑↑K
h : Kᗮ = ⊥
⊢ K = ⊤

tactic: rwa [h, sup_comm, bot_sup_eq] at this
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.794030
inst✝⁵ : IsROrC 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : CompleteSpace ↑↑K
h : Kᗮ = ⊥
this : K ⊔ Kᗮ = ⊤
⊢ K = ⊤

tactic: rw [h, Submodule.top_orthogonal_eq_bot]
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.794030
inst✝⁵ : IsROrC 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : CompleteSpace ↑↑K
h : K = ⊤
⊢ Kᗮ = ⊥
Theorem: Lists'.to_ofList
File: Mathlib/SetTheory/Lists.lean

tactic: induction l <;> simp [*]
state_before: α : Type u_1
l : List (Lists α)
⊢ toList (ofList l) = l
Theorem: pow_inj_iff_of_orderOf_eq_zero
File: Mathlib/GroupTheory/OrderOfElement.lean

tactic: rw [pow_eq_pow_iff_modEq, h, modEq_zero_iff]
state_before: G : Type u
A : Type v
x y : G
a b : A
n✝ m✝ : ℕ
inst✝ : LeftCancelMonoid G
h : orderOf x = 0
n m : ℕ
⊢ x ^ n = x ^ m ↔ n = m
Theorem: EuclideanGeometry.mul_dist_eq_mul_dist_of_cospherical_of_angle_eq_zero
File: Mathlib/Geometry/Euclidean/Sphere/Power.lean

tactic: obtain ⟨-, k₁, -, hab₁⟩ := angle_eq_zero_iff.mp hapb
state_before: V : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_1
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b c d p : P
h : Cospherical {a, b, c, d}
hab : a ≠ b
hcd : c ≠ d
hapb : ∠ a p b = 0
hcpd : ∠ c p d = 0
⊢ dist a p * dist b p = dist c p * dist d p

tactic: obtain ⟨-, k₂, -, hcd₁⟩ := angle_eq_zero_iff.mp hcpd
state_before: case intro.intro.intro
V : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_1
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b c d p : P
h : Cospherical {a, b, c, d}
hab : a ≠ b
hcd : c ≠ d
hapb : ∠ a p b = 0
hcpd : ∠ c p d = 0
k₁ : ℝ
hab₁ : b -ᵥ p = k₁ • (a -ᵥ p)
⊢ dist a p * dist b p = dist c p * dist d p

tactic: refine' mul_dist_eq_mul_dist_of_cospherical h ⟨k₁, _, hab₁⟩ ⟨k₂, _, hcd₁⟩ <;> by_contra hnot <;>
  simp_all only [Classical.not_not, one_smul]
state_before: case intro.intro.intro.intro.intro.intro
V : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_1
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b c d p : P
h : Cospherical {a, b, c, d}
hab : a ≠ b
hcd : c ≠ d
hapb : ∠ a p b = 0
hcpd : ∠ c p d = 0
k₁ : ℝ
hab₁ : b -ᵥ p = k₁ • (a -ᵥ p)
k₂ : ℝ
hcd₁ : d -ᵥ p = k₂ • (c -ᵥ p)
⊢ dist a p * dist b p = dist c p * dist d p

tactic: exacts [hab (vsub_left_cancel hab₁).symm, hcd (vsub_left_cancel hcd₁).symm]
state_before: case intro.intro.intro.intro.intro.intro.refine'_1
V : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_1
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b c d p : P
k₁ k₂ : ℝ
h : Cospherical {a, b, c, d}
hab : a ≠ b
hcd : c ≠ d
hapb : ∠ a p b = 0
hcpd : ∠ c p d = 0
hab₁ : b -ᵥ p = a -ᵥ p
hcd₁ : d -ᵥ p = k₂ • (c -ᵥ p)
hnot : k₁ = 1
⊢ False

case intro.intro.intro.intro.intro.intro.refine'_2
V : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
P : Type u_1
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b c d p : P
k₁ k₂ : ℝ
h : Cospherical {a, b, c, d}
hab : a ≠ b
hcd : c ≠ d
hapb : ∠ a p b = 0
hcpd : ∠ c p d = 0
hab₁ : b -ᵥ p = k₁ • (a -ᵥ p)
hcd₁ : d -ᵥ p = c -ᵥ p
hnot : k₂ = 1
⊢ False
Theorem: Lean.PersistentHashMap.size_push
File: src/lean/Lean/Data/PersistentHashMap.lean

tactic: simp [h]
state_before: α : Type u_1
β : Type u_2
ks : Array α
vs : Array β
h : Array.size ks = Array.size vs
k : α
v : β
⊢ Array.size (Array.push ks k) = Array.size (Array.push vs v)
Theorem: Filter.tendsto_iff_ptendsto
File: Mathlib/Order/Filter/Partial.lean

tactic: simp only [Tendsto, PTendsto, pmap_res]
state_before: α : Type u
β : Type v
γ : Type w
l₁ : Filter α
l₂ : Filter β
s : Set α
f : α → β
⊢ Tendsto f (l₁ ⊓ 𝓟 s) l₂ ↔ PTendsto (PFun.res f s) l₁ l₂
Theorem: Nat.ofDigits_lt_base_pow_length
File: Mathlib/Data/Nat/Digits.lean

tactic: rcases b with (_ | _ | b) <;> try simp_all
state_before: n b : ℕ
l : List ℕ
hb : 1 < b
hl : ∀ (x : ℕ), x ∈ l → x < b
⊢ ofDigits b l < b ^ List.length l

tactic: exact ofDigits_lt_base_pow_length' hl
state_before: case succ.succ
n : ℕ
l : List ℕ
b : ℕ
hl : ∀ (x : ℕ), x ∈ l → x < succ (succ b)
⊢ ofDigits (succ (succ b)) l < succ (succ b) ^ List.length l

tactic: simp_all
state_before: case succ.succ
n : ℕ
l : List ℕ
b : ℕ
hb : 1 < succ (succ b)
hl : ∀ (x : ℕ), x ∈ l → x < succ (succ b)
⊢ ofDigits (succ (succ b)) l < succ (succ b) ^ List.length l
Theorem: Finset.sup_biUnion
File: Mathlib/Data/Finset/Lattice.lean

tactic: simp [@forall_swap _ β]
state_before: F : Type ?u.39437
α : Type u_3
β : Type u_1
γ : Type u_2
ι : Type ?u.39449
κ : Type ?u.39452
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
s✝ s₁ s₂ : Finset β
f g : β → α
a : α
inst✝ : DecidableEq β
s : Finset γ
t : γ → Finset β
c : α
⊢ sup (Finset.biUnion s t) f ≤ c ↔ (sup s fun x => sup (t x) f) ≤ c
Theorem: Nat.choose_eq_descFactorial_div_factorial
File: Mathlib/Data/Nat/Choose/Basic.lean

tactic: apply mul_left_cancel₀ (factorial_ne_zero k)
state_before: n k : ℕ
⊢ choose n k = descFactorial n k / k !

tactic: rw [← descFactorial_eq_factorial_mul_choose]
state_before: n k : ℕ
⊢ k ! * choose n k = k ! * (descFactorial n k / k !)

tactic: exact (Nat.mul_div_cancel' <| factorial_dvd_descFactorial _ _).symm
state_before: n k : ℕ
⊢ descFactorial n k = k ! * (descFactorial n k / k !)
Theorem: Nat.Ico_succ_succ
File: Mathlib/Data/Nat/Interval.lean

tactic: ext x
state_before: a b c : ℕ
⊢ Ico (succ a) (succ b) = Ioc a b

tactic: rw [mem_Ico, mem_Ioc, succ_le_iff, lt_succ_iff]
state_before: case a
a b c x : ℕ
⊢ x ∈ Ico (succ a) (succ b) ↔ x ∈ Ioc a b
Theorem: WittVector.mulN_coeff
File: Mathlib/RingTheory/WittVector/MulP.lean

tactic: induction' n with n ih generalizing k
state_before: p : ℕ
R : Type u_1
hp : Fact (Nat.Prime p)
inst✝ : CommRing R
n : ℕ
x : 𝕎 R
k : ℕ
⊢ coeff (x * ↑n) k = ↑(aeval x.coeff) (wittMulN p n k)

tactic: simp only [Nat.zero_eq, Nat.cast_zero, MulZeroClass.mul_zero, zero_coeff, wittMulN,
  AlgHom.map_zero, Pi.zero_apply]
state_before: case zero
p : ℕ
R : Type u_1
hp : Fact (Nat.Prime p)
inst✝ : CommRing R
x : 𝕎 R
k✝ k : ℕ
⊢ coeff (x * ↑Nat.zero) k = ↑(aeval x.coeff) (wittMulN p Nat.zero k)

tactic: rw [wittMulN, Nat.succ_eq_add_one, Nat.cast_add, Nat.cast_one, mul_add, mul_one, aeval_bind₁,
  add_coeff]
state_before: case succ
p : ℕ
R : Type u_1
hp : Fact (Nat.Prime p)
inst✝ : CommRing R
x : 𝕎 R
k✝ n : ℕ
ih : ∀ (k : ℕ), coeff (x * ↑n) k = ↑(aeval x.coeff) (wittMulN p n k)
k : ℕ
⊢ coeff (x * ↑(Nat.succ n)) k = ↑(aeval x.coeff) (wittMulN p (Nat.succ n) k)

tactic: apply eval₂Hom_congr (RingHom.ext_int _ _) _ rfl
state_before: case succ
p : ℕ
R : Type u_1
hp : Fact (Nat.Prime p)
inst✝ : CommRing R
x : 𝕎 R
k✝ n : ℕ
ih : ∀ (k : ℕ), coeff (x * ↑n) k = ↑(aeval x.coeff) (wittMulN p n k)
k : ℕ
⊢ peval (wittAdd p k) ![(x * ↑n).coeff, x.coeff] =
    ↑(aeval fun i => ↑(aeval x.coeff) (Function.uncurry ![wittMulN p n, X] i)) (wittAdd p k)

tactic: ext1 ⟨b, i⟩
state_before: p : ℕ
R : Type u_1
hp : Fact (Nat.Prime p)
inst✝ : CommRing R
x : 𝕎 R
k✝ n : ℕ
ih : ∀ (k : ℕ), coeff (x * ↑n) k = ↑(aeval x.coeff) (wittMulN p n k)
k : ℕ
⊢ Function.uncurry ![(x * ↑n).coeff, x.coeff] = fun i => ↑(aeval x.coeff) (Function.uncurry ![wittMulN p n, X] i)

tactic: fin_cases b
state_before: case h.mk
p : ℕ
R : Type u_1
hp : Fact (Nat.Prime p)
inst✝ : CommRing R
x : 𝕎 R
k✝ n : ℕ
ih : ∀ (k : ℕ), coeff (x * ↑n) k = ↑(aeval x.coeff) (wittMulN p n k)
k : ℕ
b : Fin 2
i : ℕ
⊢ Function.uncurry ![(x * ↑n).coeff, x.coeff] (b, i) = ↑(aeval x.coeff) (Function.uncurry ![wittMulN p n, X] (b, i))

tactic: simp [Function.uncurry, Matrix.cons_val_zero, ih]
state_before: case h.mk.head
p : ℕ
R : Type u_1
hp : Fact (Nat.Prime p)
inst✝ : CommRing R
x : 𝕎 R
k✝ n : ℕ
ih : ∀ (k : ℕ), coeff (x * ↑n) k = ↑(aeval x.coeff) (wittMulN p n k)
k i : ℕ
⊢ Function.uncurry ![(x * ↑n).coeff, x.coeff] ({ val := 0, isLt := (_ : 0 < 2) }, i) =
    ↑(aeval x.coeff) (Function.uncurry ![wittMulN p n, X] ({ val := 0, isLt := (_ : 0 < 2) }, i))

tactic: simp [Function.uncurry, Matrix.cons_val_one, Matrix.head_cons, aeval_X]
state_before: case h.mk.tail.head
p : ℕ
R : Type u_1
hp : Fact (Nat.Prime p)
inst✝ : CommRing R
x : 𝕎 R
k✝ n : ℕ
ih : ∀ (k : ℕ), coeff (x * ↑n) k = ↑(aeval x.coeff) (wittMulN p n k)
k i : ℕ
⊢ Function.uncurry ![(x * ↑n).coeff, x.coeff] ({ val := 1, isLt := (_ : (fun a => a < 2) 1) }, i) =
    ↑(aeval x.coeff) (Function.uncurry ![wittMulN p n, X] ({ val := 1, isLt := (_ : (fun a => a < 2) 1) }, i))
Theorem: mem_residual_iff
File: Mathlib/Topology/GDelta.lean

tactic: simp_rw [subset_def, mem_setOf, forall_and, and_assoc]
state_before: α : Type u_1
β : Type ?u.16113
γ : Type ?u.16116
ι : Type ?u.16119
inst✝ : TopologicalSpace α
s : Set α
⊢ (∃ S, S ⊆ {t | IsOpen t ∧ Dense t} ∧ Set.Countable S ∧ ⋂₀ S ⊆ s) ↔
    ∃ S, (∀ (t : Set α), t ∈ S → IsOpen t) ∧ (∀ (t : Set α), t ∈ S → Dense t) ∧ Set.Countable S ∧ ⋂₀ S ⊆ s
Theorem: Subgroup.sup_eq_closure
File: Mathlib/GroupTheory/Subgroup/Pointwise.lean

tactic: rw [closure_eq, closure_eq]
state_before: α : Type ?u.19854
G : Type u_1
A : Type ?u.19860
S : Type ?u.19863
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
H K : Subgroup G
⊢ closure ↑H ⊔ closure ↑K ≤ H ⊔ K
Theorem: StarOrderedRing.nonneg_iff
File: Mathlib/Algebra/Star/Order.lean

tactic: simp only [le_iff, zero_add, exists_eq_right']
state_before: R : Type u
inst✝² : NonUnitalSemiring R
inst✝¹ : PartialOrder R
inst✝ : StarOrderedRing R
x : R
⊢ 0 ≤ x ↔ x ∈ AddSubmonoid.closure (Set.range fun s => star s * s)
Theorem: thickenedIndicatorAux_zero
File: Mathlib/Topology/MetricSpace/ThickenedIndicator.lean

tactic: rw [thickening, mem_setOf_eq, not_lt] at x_out
state_before: α : Type u_1
inst✝ : PseudoEMetricSpace α
δ : ℝ
δ_pos : 0 < δ
E : Set α
x : α
x_out : ¬x ∈ thickening δ E
⊢ thickenedIndicatorAux δ E x = 0

tactic: unfold thickenedIndicatorAux
state_before: α : Type u_1
inst✝ : PseudoEMetricSpace α
δ : ℝ
δ_pos : 0 < δ
E : Set α
x : α
x_out : ENNReal.ofReal δ ≤ infEdist x E
⊢ thickenedIndicatorAux δ E x = 0

tactic: apply le_antisymm _ bot_le
state_before: α : Type u_1
inst✝ : PseudoEMetricSpace α
δ : ℝ
δ_pos : 0 < δ
E : Set α
x : α
x_out : ENNReal.ofReal δ ≤ infEdist x E
⊢ 1 - infEdist x E / ENNReal.ofReal δ = 0

tactic: have key := tsub_le_tsub
  (@rfl _ (1 : ℝ≥0∞)).le (ENNReal.div_le_div x_out (@rfl _ (ENNReal.ofReal δ : ℝ≥0∞)).le)
state_before: α : Type u_1
inst✝ : PseudoEMetricSpace α
δ : ℝ
δ_pos : 0 < δ
E : Set α
x : α
x_out : ENNReal.ofReal δ ≤ infEdist x E
⊢ 1 - infEdist x E / ENNReal.ofReal δ ≤ ⊥

tactic: rw [ENNReal.div_self (ne_of_gt (ENNReal.ofReal_pos.mpr δ_pos)) ofReal_ne_top] at key
state_before: α : Type u_1
inst✝ : PseudoEMetricSpace α
δ : ℝ
δ_pos : 0 < δ
E : Set α
x : α
x_out : ENNReal.ofReal δ ≤ infEdist x E
key : 1 - infEdist x E / ENNReal.ofReal δ ≤ 1 - ENNReal.ofReal δ / ENNReal.ofReal δ
⊢ 1 - infEdist x E / ENNReal.ofReal δ ≤ ⊥

tactic: simpa using key
state_before: α : Type u_1
inst✝ : PseudoEMetricSpace α
δ : ℝ
δ_pos : 0 < δ
E : Set α
x : α
x_out : ENNReal.ofReal δ ≤ infEdist x E
key : 1 - infEdist x E / ENNReal.ofReal δ ≤ 1 - 1
⊢ 1 - infEdist x E / ENNReal.ofReal δ ≤ ⊥
Theorem: finprod_mem_eq_prod_filter
File: Mathlib/Algebra/BigOperators/Finprod.lean

tactic: ext x
state_before: α : Type u_1
β : Type ?u.196353
ι : Type ?u.196356
G : Type ?u.196359
M : Type u_2
N : Type ?u.196365
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
f : α → M
s : Set α
inst✝ : DecidablePred fun x => x ∈ s
hf : Set.Finite (mulSupport f)
⊢ (s ∩ mulSupport fun i => f i) = ↑(Finset.filter (fun x => x ∈ s) (Finite.toFinset hf)) ∩ mulSupport fun i => f i

tactic: simp [and_comm]
state_before: case h
α : Type u_1
β : Type ?u.196353
ι : Type ?u.196356
G : Type ?u.196359
M : Type u_2
N : Type ?u.196365
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
f : α → M
s : Set α
inst✝ : DecidablePred fun x => x ∈ s
hf : Set.Finite (mulSupport f)
x : α
⊢ (x ∈ s ∩ mulSupport fun i => f i) ↔
    x ∈ ↑(Finset.filter (fun x => x ∈ s) (Finite.toFinset hf)) ∩ mulSupport fun i => f i
Theorem: LiouvilleWith.sub_int_iff
File: Mathlib/NumberTheory/Liouville/LiouvilleWith.lean

tactic: rw [← Rat.cast_coe_int, sub_rat_iff]
state_before: p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
⊢ LiouvilleWith p (x - ↑m) ↔ LiouvilleWith p x
Theorem: CofiniteTopology.mem_nhds_iff
File: Mathlib/Topology/Constructions.lean

tactic: simp [nhds_eq]
state_before: α : Type u
β : Type v
γ : Type ?u.18624
δ : Type ?u.18627
ε : Type ?u.18630
ζ : Type ?u.18633
a : CofiniteTopology α
s : Set (CofiniteTopology α)
⊢ s ∈ 𝓝 a ↔ a ∈ s ∧ Set.Finite (sᶜ)
Theorem: MvPolynomial.mem_supported
File: Mathlib/Data/MvPolynomial/Supported.lean

tactic: rw [supported_eq_range_rename, AlgHom.mem_range]
state_before: σ : Type u_1
τ : Type ?u.120933
R : Type u
S : Type v
r : R
e : ℕ
n m : σ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
s t : Set σ
⊢ p ∈ supported R s ↔ ↑(vars p) ⊆ s

tactic: constructor
state_before: σ : Type u_1
τ : Type ?u.120933
R : Type u
S : Type v
r : R
e : ℕ
n m : σ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
s t : Set σ
⊢ (∃ x, ↑(rename Subtype.val) x = p) ↔ ↑(vars p) ⊆ s

tactic: rintro ⟨p, rfl⟩
state_before: case mp
σ : Type u_1
τ : Type ?u.120933
R : Type u
S : Type v
r : R
e : ℕ
n m : σ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
s t : Set σ
⊢ (∃ x, ↑(rename Subtype.val) x = p) → ↑(vars p) ⊆ s

tactic: refine' _root_.trans (Finset.coe_subset.2 (vars_rename _ _)) _
state_before: case mp.intro
σ : Type u_1
τ : Type ?u.120933
R : Type u
S : Type v
r : R
e : ℕ
n m : σ
inst✝ : CommSemiring R
q : MvPolynomial σ R
s t : Set σ
p : MvPolynomial { x // x ∈ s } R
⊢ ↑(vars (↑(rename Subtype.val) p)) ⊆ s

tactic: simp
state_before: case mp.intro
σ : Type u_1
τ : Type ?u.120933
R : Type u
S : Type v
r : R
e : ℕ
n m : σ
inst✝ : CommSemiring R
q : MvPolynomial σ R
s t : Set σ
p : MvPolynomial { x // x ∈ s } R
⊢ ↑(Finset.image Subtype.val (vars p)) ⊆ s

tactic: intro hs
state_before: case mpr
σ : Type u_1
τ : Type ?u.120933
R : Type u
S : Type v
r : R
e : ℕ
n m : σ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
s t : Set σ
⊢ ↑(vars p) ⊆ s → ∃ x, ↑(rename Subtype.val) x = p

tactic: exact exists_rename_eq_of_vars_subset_range p ((↑) : s → σ) Subtype.val_injective (by simpa)
state_before: case mpr
σ : Type u_1
τ : Type ?u.120933
R : Type u
S : Type v
r : R
e : ℕ
n m : σ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
s t : Set σ
hs : ↑(vars p) ⊆ s
⊢ ∃ x, ↑(rename Subtype.val) x = p

tactic: simpa
state_before: σ : Type u_1
τ : Type ?u.120933
R : Type u
S : Type v
r : R
e : ℕ
n m : σ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
s t : Set σ
hs : ↑(vars p) ⊆ s
⊢ ↑(vars p) ⊆ Set.range Subtype.val
Theorem: StarConvex.preimage_add_left
File: Mathlib/Analysis/Convex/Star.lean

tactic: rw [add_comm] at hs
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.72281
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
x y z : E
s : Set E
hs : StarConvex 𝕜 (x + z) s
⊢ StarConvex 𝕜 x ((fun x => x + z) ⁻¹' s)

tactic: simpa only [add_comm] using hs.preimage_add_right
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.72281
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
x y z : E
s : Set E
hs : StarConvex 𝕜 (z + x) s
⊢ StarConvex 𝕜 x ((fun x => x + z) ⁻¹' s)
Theorem: Substring.ValidFor.foldl
File: Std/Data/String/Lemmas.lean

tactic: simp [-List.append_assoc, Substring.foldl, foldlAux_of_valid]
state_before: α : Type u_1
l m r : List Char
f : α → Char → α
init : α
⊢ Substring.foldl f init
      { str := { data := l ++ m ++ r }, startPos := { byteIdx := utf8Len l },
        stopPos := { byteIdx := utf8Len l + utf8Len m } } =
    List.foldl f init m
Theorem: sum_four_sq_mul_sum_four_sq
File: Mathlib/Algebra/GroupPower/Identities.lean

tactic: ring
state_before: R : Type u_1
inst✝ : CommRing R
a b x₁ x₂ x₃ x₄ x₅ x₆ x₇ x₈ y₁ y₂ y₃ y₄ y₅ y₆ y₇ y₈ n : R
⊢ (x₁ ^ 2 + x₂ ^ 2 + x₃ ^ 2 + x₄ ^ 2) * (y₁ ^ 2 + y₂ ^ 2 + y₃ ^ 2 + y₄ ^ 2) =
    (x₁ * y₁ - x₂ * y₂ - x₃ * y₃ - x₄ * y₄) ^ 2 + (x₁ * y₂ + x₂ * y₁ + x₃ * y₄ - x₄ * y₃) ^ 2 +
        (x₁ * y₃ - x₂ * y₄ + x₃ * y₁ + x₄ * y₂) ^ 2 +
      (x₁ * y₄ + x₂ * y₃ - x₃ * y₂ + x₄ * y₁) ^ 2
Theorem: Fin.cast_trans
File: Mathlib/Data/Fin/Basic.lean

tactic: ext
state_before: n m k : ℕ
h : n = m
h' : m = k
i : Fin n
⊢ ↑(cast h') (↑(cast h) i) = ↑(cast (_ : n = k)) i

tactic: simp
state_before: case h
n m k : ℕ
h : n = m
h' : m = k
i : Fin n
⊢ ↑(↑(cast h') (↑(cast h) i)) = ↑(↑(cast (_ : n = k)) i)
Theorem: PFunctor.Approx.agree_trival
File: Mathlib/Data/PFunctor/Univariate/M.lean

tactic: constructor
state_before: F : PFunctor
x : CofixA F 0
y : CofixA F 1
⊢ Agree x y
Theorem: LinearMap.toMatrix_reindexRange
File: Mathlib/LinearAlgebra/Matrix/ToLin.lean

tactic: simp_rw [LinearMap.toMatrix_apply, Basis.reindexRange_self, Basis.reindexRange_repr]
state_before: R : Type u_3
inst✝⁹ : CommSemiring R
l : Type ?u.1797707
m : Type u_4
n : Type u_5
inst✝⁸ : Fintype n
inst✝⁷ : Fintype m
inst✝⁶ : DecidableEq n
M₁ : Type u_1
M₂ : Type u_2
inst✝⁵ : AddCommMonoid M₁
inst✝⁴ : AddCommMonoid M₂
inst✝³ : Module R M₁
inst✝² : Module R M₂
v₁ : Basis n R M₁
v₂ : Basis m R M₂
inst✝¹ : DecidableEq M₁
inst✝ : DecidableEq M₂
f : M₁ →ₗ[R] M₂
k : m
i : n
⊢ ↑(toMatrix (Basis.reindexRange v₁) (Basis.reindexRange v₂)) f
      { val := ↑v₂ k, property := (_ : ↑v₂ k ∈ Set.range ↑v₂) }
      { val := ↑v₁ i, property := (_ : ↑v₁ i ∈ Set.range ↑v₁) } =
    ↑(toMatrix v₁ v₂) f k i
Theorem: Polynomial.iterate_derivative_nat_cast_mul
File: Mathlib/Data/Polynomial/Derivative.lean

tactic: induction' k with k ih generalizing f <;> simp [*]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : Semiring R
n k : ℕ
f : R[X]
⊢ (↑derivative^[k]) (↑n * f) = ↑n * (↑derivative^[k]) f