tasksource/leandojo huggingface dataset:
Theorem: Finset.mul_aux
File: Mathlib/Combinatorics/Additive/PluenneckeRuzsa.lean

tactic: rintro A' hAA'
state_before: α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C : Finset α
hA : Finset.Nonempty A
hAB : A ⊆ B
h : ∀ (A' : Finset α), A' ∈ erase (powerset B) ∅ → ↑(card (A * C)) / ↑(card A) ≤ ↑(card (A' * C)) / ↑(card A')
⊢ ∀ (A' : Finset α), A' ⊆ A → card (A * C) * card A' ≤ card (A' * C) * card A

tactic: obtain rfl | hA' := A'.eq_empty_or_nonempty
state_before: α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C : Finset α
hA : Finset.Nonempty A
hAB : A ⊆ B
h : ∀ (A' : Finset α), A' ∈ erase (powerset B) ∅ → ↑(card (A * C)) / ↑(card A) ≤ ↑(card (A' * C)) / ↑(card A')
A' : Finset α
hAA' : A' ⊆ A
⊢ card (A * C) * card A' ≤ card (A' * C) * card A

tactic: have hA₀ : (0 : ℚ≥0) < A.card := cast_pos.2 hA.card_pos
state_before: case inr
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C : Finset α
hA : Finset.Nonempty A
hAB : A ⊆ B
h : ∀ (A' : Finset α), A' ∈ erase (powerset B) ∅ → ↑(card (A * C)) / ↑(card A) ≤ ↑(card (A' * C)) / ↑(card A')
A' : Finset α
hAA' : A' ⊆ A
hA' : Finset.Nonempty A'
⊢ card (A * C) * card A' ≤ card (A' * C) * card A

tactic: have hA₀' : (0 : ℚ≥0) < A'.card := cast_pos.2 hA'.card_pos
state_before: case inr
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C : Finset α
hA : Finset.Nonempty A
hAB : A ⊆ B
h : ∀ (A' : Finset α), A' ∈ erase (powerset B) ∅ → ↑(card (A * C)) / ↑(card A) ≤ ↑(card (A' * C)) / ↑(card A')
A' : Finset α
hAA' : A' ⊆ A
hA' : Finset.Nonempty A'
hA₀ : 0 < ↑(card A)
⊢ card (A * C) * card A' ≤ card (A' * C) * card A

tactic: exact_mod_cast
  (div_le_div_iff hA₀ hA₀').1
    (h _ <| mem_erase_of_ne_of_mem hA'.ne_empty <| mem_powerset.2 <| hAA'.trans hAB)
state_before: case inr
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C : Finset α
hA : Finset.Nonempty A
hAB : A ⊆ B
h : ∀ (A' : Finset α), A' ∈ erase (powerset B) ∅ → ↑(card (A * C)) / ↑(card A) ≤ ↑(card (A' * C)) / ↑(card A')
A' : Finset α
hAA' : A' ⊆ A
hA' : Finset.Nonempty A'
hA₀ : 0 < ↑(card A)
hA₀' : 0 < ↑(card A')
⊢ card (A * C) * card A' ≤ card (A' * C) * card A

tactic: simp
state_before: case inl
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C : Finset α
hA : Finset.Nonempty A
hAB : A ⊆ B
h : ∀ (A' : Finset α), A' ∈ erase (powerset B) ∅ → ↑(card (A * C)) / ↑(card A) ≤ ↑(card (A' * C)) / ↑(card A')
hAA' : ∅ ⊆ A
⊢ card (A * C) * card ∅ ≤ card (∅ * C) * card A
Theorem: Complex.tanh_conj
File: Mathlib/Data/Complex/Exponential.lean

tactic: rw [tanh, sinh_conj, cosh_conj, ← map_div₀, tanh]
state_before: x y : ℂ
⊢ tanh (↑(starRingEnd ℂ) x) = ↑(starRingEnd ℂ) (tanh x)
Theorem: WithBot.some_le_some
File: Mathlib/Order/WithBot.lean

tactic: simp [LE.le]
state_before: α : Type u_1
β : Type ?u.7924
γ : Type ?u.7927
δ : Type ?u.7930
a b : α
inst✝ : LE α
⊢ Option.some a ≤ Option.some b ↔ a ≤ b
Theorem: MeasureTheory.SignedMeasure.singularPart_sub
File: Mathlib/MeasureTheory/Decomposition/Lebesgue.lean

tactic: rw [sub_eq_add_neg, sub_eq_add_neg, singularPart_add, singularPart_neg]
state_before: α : Type u_1
β : Type ?u.640818
m : MeasurableSpace α
μ✝ ν : Measure α
s✝ t✝ s t : SignedMeasure α
μ : Measure α
inst✝¹ : HaveLebesgueDecomposition s μ
inst✝ : HaveLebesgueDecomposition t μ
⊢ singularPart (s - t) μ = singularPart s μ - singularPart t μ
Theorem: ProjectiveSpectrum.gc_set
File: Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Topology.lean

tactic: have ideal_gc : GaloisConnection Ideal.span _ := (Submodule.gi A _).gc
state_before: R : Type u_2
A : Type u_1
inst✝³ : CommSemiring R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
⊢ GaloisConnection (fun s => zeroLocus 𝒜 s) fun t => ↑(vanishingIdeal t)

tactic: simpa [zeroLocus_span, Function.comp] using GaloisConnection.compose ideal_gc (gc_ideal 𝒜)
state_before: R : Type u_2
A : Type u_1
inst✝³ : CommSemiring R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
ideal_gc : GaloisConnection Ideal.span SetLike.coe
⊢ GaloisConnection (fun s => zeroLocus 𝒜 s) fun t => ↑(vanishingIdeal t)
Theorem: Ordset.pos_size_of_mem
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: simp [Membership.mem, mem] at h_mem
state_before: α : Type u_1
inst✝¹ : Preorder α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
x : α
t : Ordset α
h_mem : x ∈ t
⊢ 0 < size t

tactic: apply Ordnode.pos_size_of_mem t.property.sz h_mem
state_before: α : Type u_1
inst✝¹ : Preorder α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
x : α
t : Ordset α
h_mem : Ordnode.mem x ↑t = true
⊢ 0 < size t
Theorem: upperBounds_empty
File: Mathlib/Order/Bounds/Basic.lean

tactic: simp only [upperBounds, eq_univ_iff_forall, mem_setOf_eq, ball_empty_iff, forall_true_iff]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝¹ : Preorder α
inst✝ : Preorder β
s t : Set α
a b : α
⊢ upperBounds ∅ = univ
Theorem: Matrix.mul_diagonal
File: Mathlib/Data/Matrix/Basic.lean

tactic: rw [← diagonal_transpose]
state_before: l : Type ?u.272607
m : Type u_2
n : Type u_1
o : Type ?u.272616
m' : o → Type ?u.272621
n' : o → Type ?u.272626
R : Type ?u.272629
S : Type ?u.272632
α : Type v
β : Type w
γ : Type ?u.272639
inst✝² : NonUnitalNonAssocSemiring α
inst✝¹ : Fintype n
inst✝ : DecidableEq n
d : n → α
M : Matrix m n α
i : m
j : n
⊢ (M ⬝ diagonal d) i j = M i j * d j

tactic: apply dotProduct_diagonal
state_before: l : Type ?u.272607
m : Type u_2
n : Type u_1
o : Type ?u.272616
m' : o → Type ?u.272621
n' : o → Type ?u.272626
R : Type ?u.272629
S : Type ?u.272632
α : Type v
β : Type w
γ : Type ?u.272639
inst✝² : NonUnitalNonAssocSemiring α
inst✝¹ : Fintype n
inst✝ : DecidableEq n
d : n → α
M : Matrix m n α
i : m
j : n
⊢ (M ⬝ (diagonal d)ᵀ) i j = M i j * d j
Theorem: Polynomial.Monic.as_sum
File: Mathlib/Data/Polynomial/Monic.lean

tactic: conv_lhs => rw [p.as_sum_range_C_mul_X_pow, sum_range_succ_comm]
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hp : Monic p
⊢ p = X ^ natDegree p + ∑ i in range (natDegree p), ↑C (coeff p i) * X ^ i

tactic: suffices C (p.coeff p.natDegree) = 1 by rw [this, one_mul]
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hp : Monic p
⊢ ↑C (coeff p (natDegree p)) * X ^ natDegree p + ∑ x in range (natDegree p), ↑C (coeff p x) * X ^ x =
    X ^ natDegree p + ∑ i in range (natDegree p), ↑C (coeff p i) * X ^ i

tactic: exact congr_arg C hp
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hp : Monic p
⊢ ↑C (coeff p (natDegree p)) = 1

tactic: rw [this, one_mul]
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hp : Monic p
this : ↑C (coeff p (natDegree p)) = 1
⊢ ↑C (coeff p (natDegree p)) * X ^ natDegree p + ∑ x in range (natDegree p), ↑C (coeff p x) * X ^ x =
    X ^ natDegree p + ∑ i in range (natDegree p), ↑C (coeff p i) * X ^ i
Theorem: CauchyFilter.mem_uniformity'
File: Mathlib/Topology/UniformSpace/Completion.lean

tactic: refine mem_uniformity.trans (exists_congr (fun t => and_congr_right_iff.mpr (fun _h => ?_)))
state_before: α : Type u
inst✝² : UniformSpace α
β : Type v
γ : Type w
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
s : Set (CauchyFilter α × CauchyFilter α)
⊢ s ∈ 𝓤 (CauchyFilter α) ↔ ∃ t, t ∈ 𝓤 α ∧ ∀ (f g : CauchyFilter α), t ∈ ↑f ×ˢ ↑g → (f, g) ∈ s

tactic: exact ⟨fun h _f _g ht => h ht, fun h _p hp => h _ _ hp⟩
state_before: α : Type u
inst✝² : UniformSpace α
β : Type v
γ : Type w
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
s : Set (CauchyFilter α × CauchyFilter α)
t : Set (α × α)
_h : t ∈ 𝓤 α
⊢ gen t ⊆ s ↔ ∀ (f g : CauchyFilter α), t ∈ ↑f ×ˢ ↑g → (f, g) ∈ s
Theorem: NormedSpace.eq_iff_forall_dual_eq
File: Mathlib/Analysis/NormedSpace/Dual.lean

tactic: rw [← sub_eq_zero, eq_zero_iff_forall_dual_eq_zero 𝕜 (x - y)]
state_before: 𝕜 : Type v
inst✝² : IsROrC 𝕜
E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x y : E
⊢ x = y ↔ ∀ (g : Dual 𝕜 E), ↑g x = ↑g y

tactic: simp [sub_eq_zero]
state_before: 𝕜 : Type v
inst✝² : IsROrC 𝕜
E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x y : E
⊢ (∀ (g : Dual 𝕜 E), ↑g (x - y) = 0) ↔ ∀ (g : Dual 𝕜 E), ↑g x = ↑g y
Theorem: ContinuousMap.Nullhomotopic.comp_right
File: Mathlib/Topology/Homotopy/Contractible.lean

tactic: cases' hf with y hy
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
f : C(X, Y)
hf : Nullhomotopic f
g : C(Y, Z)
⊢ Nullhomotopic (comp g f)

tactic: use g y
state_before: case intro
X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
f : C(X, Y)
g : C(Y, Z)
y : Y
hy : Homotopic f (const X y)
⊢ Nullhomotopic (comp g f)

tactic: exact Homotopic.hcomp hy (Homotopic.refl g)
state_before: case intro
X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
f : C(X, Y)
g : C(Y, Z)
y : Y
hy : Homotopic f (const X y)
⊢ Homotopic (comp g f) (const X (↑g y))
Theorem: PNat.XgcdType.finish_v
File: Mathlib/Data/PNat/Xgcd.lean

tactic: let ha : u.r + u.b * u.q = u.a := u.rq_eq
state_before: u : XgcdType
hr : r u = 0
⊢ v (finish u) = v u

tactic: rw [hr, zero_add] at ha
state_before: u : XgcdType
hr : r u = 0
ha : r u + ↑(b u) * q u = ↑(a u) := rq_eq u
⊢ v (finish u) = v u

tactic: ext
state_before: u : XgcdType
hr : r u = 0
ha : ↑(b u) * q u = ↑(a u)
⊢ v (finish u) = v u

tactic: change (u.wp + 1) * u.b + ((u.wp + 1) * u.qp + u.x) * u.b = u.w * u.a + u.x * u.b
state_before: case h₁
u : XgcdType
hr : r u = 0
ha : ↑(b u) * q u = ↑(a u)
⊢ (v (finish u)).fst = (v u).fst

tactic: have : u.wp + 1 = u.w := rfl
state_before: case h₁
u : XgcdType
hr : r u = 0
ha : ↑(b u) * q u = ↑(a u)
⊢ (u.wp + 1) * ↑(b u) + ((u.wp + 1) * qp u + u.x) * ↑(b u) = ↑(w u) * ↑(a u) + u.x * ↑(b u)

tactic: rw [this, ← ha, u.qp_eq hr]
state_before: case h₁
u : XgcdType
hr : r u = 0
ha : ↑(b u) * q u = ↑(a u)
this : u.wp + 1 = ↑(w u)
⊢ (u.wp + 1) * ↑(b u) + ((u.wp + 1) * qp u + u.x) * ↑(b u) = ↑(w u) * ↑(a u) + u.x * ↑(b u)

tactic: ring
state_before: case h₁
u : XgcdType
hr : r u = 0
ha : ↑(b u) * q u = ↑(a u)
this : u.wp + 1 = ↑(w u)
⊢ ↑(w u) * ↑(b u) + (↑(w u) * qp u + u.x) * ↑(b u) = ↑(w u) * (↑(b u) * (qp u + 1)) + u.x * ↑(b u)

tactic: change u.y * u.b + (u.y * u.qp + u.z) * u.b = u.y * u.a + u.z * u.b
state_before: case h₂
u : XgcdType
hr : r u = 0
ha : ↑(b u) * q u = ↑(a u)
⊢ (v (finish u)).snd = (v u).snd

tactic: rw [← ha, u.qp_eq hr]
state_before: case h₂
u : XgcdType
hr : r u = 0
ha : ↑(b u) * q u = ↑(a u)
⊢ u.y * ↑(b u) + (u.y * qp u + ↑(z u)) * ↑(b u) = u.y * ↑(a u) + ↑(z u) * ↑(b u)

tactic: ring
state_before: case h₂
u : XgcdType
hr : r u = 0
ha : ↑(b u) * q u = ↑(a u)
⊢ u.y * ↑(b u) + (u.y * qp u + ↑(z u)) * ↑(b u) = u.y * (↑(b u) * (qp u + 1)) + ↑(z u) * ↑(b u)
Theorem: Part.bind_le
File: Mathlib/Data/Part.lean

tactic: constructor <;> intro h
state_before: α✝ : Type ?u.51205
β : Type u_1
γ : Type ?u.51211
α : Type u_1
x : Part α
f : α → Part β
y : Part β
⊢ x >>= f ≤ y ↔ ∀ (a : α), a ∈ x → f a ≤ y

tactic: intro a h' b
state_before: case mp
α✝ : Type ?u.51205
β : Type u_1
γ : Type ?u.51211
α : Type u_1
x : Part α
f : α → Part β
y : Part β
h : x >>= f ≤ y
⊢ ∀ (a : α), a ∈ x → f a ≤ y

tactic: have h := h b
state_before: case mp
α✝ : Type ?u.51205
β : Type u_1
γ : Type ?u.51211
α : Type u_1
x : Part α
f : α → Part β
y : Part β
h : x >>= f ≤ y
a : α
h' : a ∈ x
b : β
⊢ b ∈ f a → b ∈ y

tactic: simp only [and_imp, exists_prop, bind_eq_bind, mem_bind_iff, exists_imp] at h
state_before: case mp
α✝ : Type ?u.51205
β : Type u_1
γ : Type ?u.51211
α : Type u_1
x : Part α
f : α → Part β
y : Part β
h✝ : x >>= f ≤ y
a : α
h' : a ∈ x
b : β
h : b ∈ x >>= f → b ∈ y
⊢ b ∈ f a → b ∈ y

tactic: apply h _ h'
state_before: case mp
α✝ : Type ?u.51205
β : Type u_1
γ : Type ?u.51211
α : Type u_1
x : Part α
f : α → Part β
y : Part β
h✝ : x >>= f ≤ y
a : α
h' : a ∈ x
b : β
h : ∀ (x_1 : α), x_1 ∈ x → b ∈ f x_1 → b ∈ y
⊢ b ∈ f a → b ∈ y

tactic: intro b h'
state_before: case mpr
α✝ : Type ?u.51205
β : Type u_1
γ : Type ?u.51211
α : Type u_1
x : Part α
f : α → Part β
y : Part β
h : ∀ (a : α), a ∈ x → f a ≤ y
⊢ x >>= f ≤ y

tactic: simp only [exists_prop, bind_eq_bind, mem_bind_iff] at h'
state_before: case mpr
α✝ : Type ?u.51205
β : Type u_1
γ : Type ?u.51211
α : Type u_1
x : Part α
f : α → Part β
y : Part β
h : ∀ (a : α), a ∈ x → f a ≤ y
b : β
h' : b ∈ x >>= f
⊢ b ∈ y

tactic: rcases h' with ⟨a, h₀, h₁⟩
state_before: case mpr
α✝ : Type ?u.51205
β : Type u_1
γ : Type ?u.51211
α : Type u_1
x : Part α
f : α → Part β
y : Part β
h : ∀ (a : α), a ∈ x → f a ≤ y
b : β
h' : ∃ a, a ∈ x ∧ b ∈ f a
⊢ b ∈ y

tactic: apply h _ h₀ _ h₁
state_before: case mpr.intro.intro
α✝ : Type ?u.51205
β : Type u_1
γ : Type ?u.51211
α : Type u_1
x : Part α
f : α → Part β
y : Part β
h : ∀ (a : α), a ∈ x → f a ≤ y
b : β
a : α
h₀ : a ∈ x
h₁ : b ∈ f a
⊢ b ∈ y
Theorem: mul_inv_cancel_left₀
File: Mathlib/Algebra/GroupWithZero/Basic.lean

tactic: simp [h]
state_before: α : Type ?u.14933
M₀ : Type ?u.14936
G₀ : Type u_1
M₀' : Type ?u.14942
G₀' : Type ?u.14945
F : Type ?u.14948
F' : Type ?u.14951
inst✝ : GroupWithZero G₀
a b✝ c g h✝ x : G₀
h : a ≠ 0
b : G₀
⊢ a * a⁻¹ * b = b
Theorem: Finmap.empty_union
File: Mathlib/Data/Finmap.lean

tactic: rw [← empty_toFinmap]
state_before: α : Type u
β : α → Type v
inst✝ : DecidableEq α
s₁✝ : Finmap β
s₁ : AList β
⊢ ∅ ∪ ⟦s₁⟧ = ⟦s₁⟧

tactic: simp [-empty_toFinmap, AList.toFinmap_eq, union_toFinmap, AList.union_assoc]
state_before: α : Type u
β : α → Type v
inst✝ : DecidableEq α
s₁✝ : Finmap β
s₁ : AList β
⊢ ⟦∅⟧ ∪ ⟦s₁⟧ = ⟦s₁⟧
Theorem: Int.fract_eq_iff
File: Mathlib/Algebra/Order/Floor.lean

tactic: rw [← h]
state_before: F : Type ?u.161626
α : Type u_1
β : Type ?u.161632
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a✝ a b : α
h : fract a = b
⊢ 0 ≤ b ∧ b < 1 ∧ ∃ z, a - b = ↑z

tactic: exact ⟨fract_nonneg _, fract_lt_one _, ⟨⌊a⌋, sub_sub_cancel _ _⟩⟩
state_before: F : Type ?u.161626
α : Type u_1
β : Type ?u.161632
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a✝ a b : α
h : fract a = b
⊢ 0 ≤ fract a ∧ fract a < 1 ∧ ∃ z, a - fract a = ↑z

tactic: rintro ⟨h₀, h₁, z, hz⟩
state_before: F : Type ?u.161626
α : Type u_1
β : Type ?u.161632
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a✝ a b : α
⊢ (0 ≤ b ∧ b < 1 ∧ ∃ z, a - b = ↑z) → fract a = b

tactic: rw [← self_sub_floor, eq_comm, eq_sub_iff_add_eq, add_comm, ← eq_sub_iff_add_eq, hz,
  Int.cast_inj, floor_eq_iff, ← hz]
state_before: case intro.intro.intro
F : Type ?u.161626
α : Type u_1
β : Type ?u.161632
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z✝ : ℤ
a✝ a b : α
h₀ : 0 ≤ b
h₁ : b < 1
z : ℤ
hz : a - b = ↑z
⊢ fract a = b

tactic: constructor <;> simpa [sub_eq_add_neg, add_assoc]
state_before: case intro.intro.intro
F : Type ?u.161626
α : Type u_1
β : Type ?u.161632
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z✝ : ℤ
a✝ a b : α
h₀ : 0 ≤ b
h₁ : b < 1
z : ℤ
hz : a - b = ↑z
⊢ a - b ≤ a ∧ a < a - b + 1
Theorem: Finset.prod_filter
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: rw [if_pos]
state_before: ι : Type ?u.337590
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a✝ : α
f✝ g : α → β
inst✝¹ : CommMonoid β
p : α → Prop
inst✝ : DecidablePred p
f : α → β
a : α
h : a ∈ filter p s
⊢ f a = if p a then f a else 1

tactic: simpa using (mem_filter.1 h).2
state_before: case hc
ι : Type ?u.337590
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a✝ : α
f✝ g : α → β
inst✝¹ : CommMonoid β
p : α → Prop
inst✝ : DecidablePred p
f : α → β
a : α
h : a ∈ filter p s
⊢ p a

tactic: simpa using h hs
state_before: ι : Type ?u.337590
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝¹ : CommMonoid β
p : α → Prop
inst✝ : DecidablePred p
f : α → β
x : α
hs : x ∈ s
h : x ∈ s → ¬p x
⊢ ¬p x
Theorem: ne_one_of_nnnorm_ne_zero
File: Mathlib/Analysis/Normed/Group/Basic.lean

tactic: rintro rfl
state_before: 𝓕 : Type ?u.321774
𝕜 : Type ?u.321777
α : Type ?u.321780
ι : Type ?u.321783
κ : Type ?u.321786
E : Type u_1
F : Type ?u.321792
G : Type ?u.321795
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
inst✝ : SeminormedGroup G
s : Set E
a✝ a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
a : E
⊢ a = 1 → ‖a‖₊ = 0

tactic: exact nnnorm_one'
state_before: 𝓕 : Type ?u.321774
𝕜 : Type ?u.321777
α : Type ?u.321780
ι : Type ?u.321783
κ : Type ?u.321786
E : Type u_1
F : Type ?u.321792
G : Type ?u.321795
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
inst✝ : SeminormedGroup G
s : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
⊢ ‖1‖₊ = 0
Theorem: Nat.add_div_left
File: Std/Data/Nat/Lemmas.lean

tactic: rw [Nat.add_comm, add_div_right x H]
state_before: x z : Nat
H : 0 < z
⊢ (z + x) / z = succ (x / z)
Theorem: Lagrange.eval_nodal_at_node
File: Mathlib/LinearAlgebra/Lagrange.lean

tactic: rw [eval_nodal, prod_eq_zero_iff]
state_before: F : Type u_2
inst✝ : Field F
ι : Type u_1
s : Finset ι
v : ι → F
i : ι
r : ι → F
x : F
hi : i ∈ s
⊢ eval (v i) (nodal s v) = 0

tactic: exact ⟨i, hi, sub_eq_zero_of_eq rfl⟩
state_before: F : Type u_2
inst✝ : Field F
ι : Type u_1
s : Finset ι
v : ι → F
i : ι
r : ι → F
x : F
hi : i ∈ s
⊢ ∃ a, a ∈ s ∧ v i - v a = 0
Theorem: EuclideanGeometry.angle_neg
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Affine.lean

tactic: simpa only [zero_sub] using angle_const_sub 0 v₁ v₂ v₃
state_before: V : Type u_1
P : Type ?u.43288
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
v₁ v₂ v₃ : V
⊢ ∠ (-v₁) (-v₂) (-v₃) = ∠ v₁ v₂ v₃
Theorem: ENat.coe_toNat_eq_self
File: Mathlib/Data/ENat/Basic.lean

tactic: simp
state_before: m n : ℕ∞
⊢ ↑(↑toNat ⊤) = ⊤ ↔ ⊤ ≠ ⊤

tactic: simp [toNat_coe]
state_before: m n : ℕ∞
x✝ : ℕ
⊢ ↑(↑toNat ↑x✝) = ↑x✝ ↔ ↑x✝ ≠ ⊤
Theorem: Num.ofNat'_one
File: Mathlib/Data/Num/Lemmas.lean

tactic: erw [ofNat'_bit true 0, cond, ofNat'_zero]
state_before: α : Type ?u.179670
⊢ ofNat' 1 = 1

tactic: rfl
state_before: α : Type ?u.179670
⊢ (match (motive := Bool → Num → Num) true with
      | true => Num.bit1
      | false => Num.bit0)
      0 =
    1
Theorem: derangements.Equiv.RemoveNone.mem_fiber
File: Mathlib/Combinatorics/Derangements/Basic.lean

tactic: simp [RemoveNone.fiber, derangements]
state_before: α : Type u_1
β : Type ?u.70902
inst✝ : DecidableEq α
a : Option α
f : Perm α
⊢ f ∈ fiber a ↔ ∃ F, F ∈ derangements (Option α) ∧ ↑F none = a ∧ removeNone F = f
Theorem: Turing.tr_reaches₁
File: Mathlib/Computability/TuringMachine.lean

tactic: induction' ab with c₁ ac c₁ d₁ _ cd IH
state_before: σ₁ : Type u_1
σ₂ : Type u_2
f₁ : σ₁ → Option σ₁
f₂ : σ₂ → Option σ₂
tr : σ₁ → σ₂ → Prop
H : Respects f₁ f₂ tr
a₁ : σ₁
a₂ : σ₂
aa : tr a₁ a₂
b₁ : σ₁
ab : Reaches₁ f₁ a₁ b₁
⊢ ∃ b₂, tr b₁ b₂ ∧ Reaches₁ f₂ a₂ b₂

tactic: have := H aa
state_before: case single
σ₁ : Type u_1
σ₂ : Type u_2
f₁ : σ₁ → Option σ₁
f₂ : σ₂ → Option σ₂
tr : σ₁ → σ₂ → Prop
H : Respects f₁ f₂ tr
a₁ : σ₁
a₂ : σ₂
aa : tr a₁ a₂
b₁ c₁ : σ₁
ac : c₁ ∈ f₁ a₁
⊢ ∃ b₂, tr c₁ b₂ ∧ Reaches₁ f₂ a₂ b₂

tactic: rwa [show f₁ a₁ = _ from ac] at this
state_before: case single
σ₁ : Type u_1
σ₂ : Type u_2
f₁ : σ₁ → Option σ₁
f₂ : σ₂ → Option σ₂
tr : σ₁ → σ₂ → Prop
H : Respects f₁ f₂ tr
a₁ : σ₁
a₂ : σ₂
aa : tr a₁ a₂
b₁ c₁ : σ₁
ac : c₁ ∈ f₁ a₁
this :
  match f₁ a₁ with
  | some b₁ => ∃ b₂, tr b₁ b₂ ∧ Reaches₁ f₂ a₂ b₂
  | none => f₂ a₂ = none
⊢ ∃ b₂, tr c₁ b₂ ∧ Reaches₁ f₂ a₂ b₂

tactic: rcases IH with ⟨c₂, cc, ac₂⟩
state_before: case tail
σ₁ : Type u_1
σ₂ : Type u_2
f₁ : σ₁ → Option σ₁
f₂ : σ₂ → Option σ₂
tr : σ₁ → σ₂ → Prop
H : Respects f₁ f₂ tr
a₁ : σ₁
a₂ : σ₂
aa : tr a₁ a₂
b₁ c₁ d₁ : σ₁
a✝ : TransGen (fun a b => b ∈ f₁ a) a₁ c₁
cd : d₁ ∈ f₁ c₁
IH : ∃ b₂, tr c₁ b₂ ∧ Reaches₁ f₂ a₂ b₂
⊢ ∃ b₂, tr d₁ b₂ ∧ Reaches₁ f₂ a₂ b₂

tactic: have := H cc
state_before: case tail.intro.intro
σ₁ : Type u_1
σ₂ : Type u_2
f₁ : σ₁ → Option σ₁
f₂ : σ₂ → Option σ₂
tr : σ₁ → σ₂ → Prop
H : Respects f₁ f₂ tr
a₁ : σ₁
a₂ : σ₂
aa : tr a₁ a₂
b₁ c₁ d₁ : σ₁
a✝ : TransGen (fun a b => b ∈ f₁ a) a₁ c₁
cd : d₁ ∈ f₁ c₁
c₂ : σ₂
cc : tr c₁ c₂
ac₂ : Reaches₁ f₂ a₂ c₂
⊢ ∃ b₂, tr d₁ b₂ ∧ Reaches₁ f₂ a₂ b₂

tactic: rw [show f₁ c₁ = _ from cd] at this
state_before: case tail.intro.intro
σ₁ : Type u_1
σ₂ : Type u_2
f₁ : σ₁ → Option σ₁
f₂ : σ₂ → Option σ₂
tr : σ₁ → σ₂ → Prop
H : Respects f₁ f₂ tr
a₁ : σ₁
a₂ : σ₂
aa : tr a₁ a₂
b₁ c₁ d₁ : σ₁
a✝ : TransGen (fun a b => b ∈ f₁ a) a₁ c₁
cd : d₁ ∈ f₁ c₁
c₂ : σ₂
cc : tr c₁ c₂
ac₂ : Reaches₁ f₂ a₂ c₂
this :
  match f₁ c₁ with
  | some b₁ => ∃ b₂, tr b₁ b₂ ∧ Reaches₁ f₂ c₂ b₂
  | none => f₂ c₂ = none
⊢ ∃ b₂, tr d₁ b₂ ∧ Reaches₁ f₂ a₂ b₂

tactic: rcases this with ⟨d₂, dd, cd₂⟩
state_before: case tail.intro.intro
σ₁ : Type u_1
σ₂ : Type u_2
f₁ : σ₁ → Option σ₁
f₂ : σ₂ → Option σ₂
tr : σ₁ → σ₂ → Prop
H : Respects f₁ f₂ tr
a₁ : σ₁
a₂ : σ₂
aa : tr a₁ a₂
b₁ c₁ d₁ : σ₁
a✝ : TransGen (fun a b => b ∈ f₁ a) a₁ c₁
cd : d₁ ∈ f₁ c₁
c₂ : σ₂
cc : tr c₁ c₂
ac₂ : Reaches₁ f₂ a₂ c₂
this :
  match some d₁ with
  | some b₁ => ∃ b₂, tr b₁ b₂ ∧ Reaches₁ f₂ c₂ b₂
  | none => f₂ c₂ = none
⊢ ∃ b₂, tr d₁ b₂ ∧ Reaches₁ f₂ a₂ b₂

tactic: exact ⟨_, dd, ac₂.trans cd₂⟩
state_before: case tail.intro.intro.intro.intro
σ₁ : Type u_1
σ₂ : Type u_2
f₁ : σ₁ → Option σ₁
f₂ : σ₂ → Option σ₂
tr : σ₁ → σ₂ → Prop
H : Respects f₁ f₂ tr
a₁ : σ₁
a₂ : σ₂
aa : tr a₁ a₂
b₁ c₁ d₁ : σ₁
a✝ : TransGen (fun a b => b ∈ f₁ a) a₁ c₁
cd : d₁ ∈ f₁ c₁
c₂ : σ₂
cc : tr c₁ c₂
ac₂ : Reaches₁ f₂ a₂ c₂
d₂ : σ₂
dd : tr d₁ d₂
cd₂ : Reaches₁ f₂ c₂ d₂
⊢ ∃ b₂, tr d₁ b₂ ∧ Reaches₁ f₂ a₂ b₂
Theorem: FirstOrder.Language.Equiv.refl_apply
File: Mathlib/ModelTheory/Basic.lean

tactic: simp [refl]
state_before: L : Language
L' : Language
M : Type w
N : Type w'
inst✝³ : Structure L M
inst✝² : Structure L N
P : Type ?u.257731
inst✝¹ : Structure L P
Q : Type ?u.257739
inst✝ : Structure L Q
x : M
⊢ ↑(refl L M) x = x

tactic: rfl
state_before: L : Language
L' : Language
M : Type w
N : Type w'
inst✝³ : Structure L M
inst✝² : Structure L N
P : Type ?u.257731
inst✝¹ : Structure L P
Q : Type ?u.257739
inst✝ : Structure L Q
x : M
⊢ ↑(mk (_root_.Equiv.refl M)) x = x
Theorem: Rack.left_cancel_inv
File: Mathlib/Algebra/Quandle.lean

tactic: constructor
state_before: R : Type u_1
inst✝ : Rack R
x y y' : R
⊢ x ◃⁻¹ y = x ◃⁻¹ y' ↔ y = y'

tactic: apply (act' x).symm.injective
state_before: case mp
R : Type u_1
inst✝ : Rack R
x y y' : R
⊢ x ◃⁻¹ y = x ◃⁻¹ y' → y = y'

case mpr
R : Type u_1
inst✝ : Rack R
x y y' : R
⊢ y = y' → x ◃⁻¹ y = x ◃⁻¹ y'

tactic: rintro rfl
state_before: case mpr
R : Type u_1
inst✝ : Rack R
x y y' : R
⊢ y = y' → x ◃⁻¹ y = x ◃⁻¹ y'

tactic: rfl
state_before: case mpr
R : Type u_1
inst✝ : Rack R
x y : R
⊢ x ◃⁻¹ y = x ◃⁻¹ y
Theorem: Nat.fib_succ_eq_succ_sum
File: Mathlib/Data/Nat/Fib.lean

tactic: induction' n with n ih
state_before: n : ℕ
⊢ fib (n + 1) = ∑ k in Finset.range n, fib k + 1

tactic: simp
state_before: case zero

⊢ fib (zero + 1) = ∑ k in Finset.range zero, fib k + 1

tactic: calc
  fib (n + 2) = fib n + fib (n + 1) := fib_add_two
  _ = (fib n + ∑ k in Finset.range n, fib k) + 1 := by rw [ih, add_assoc]
  _ = (∑ k in Finset.range (n + 1), fib k) + 1 := by simp [Finset.range_add_one]
state_before: case succ
n : ℕ
ih : fib (n + 1) = ∑ k in Finset.range n, fib k + 1
⊢ fib (succ n + 1) = ∑ k in Finset.range (succ n), fib k + 1

tactic: rw [ih, add_assoc]
state_before: n : ℕ
ih : fib (n + 1) = ∑ k in Finset.range n, fib k + 1
⊢ fib n + fib (n + 1) = fib n + ∑ k in Finset.range n, fib k + 1

tactic: simp [Finset.range_add_one]
state_before: n : ℕ
ih : fib (n + 1) = ∑ k in Finset.range n, fib k + 1
⊢ fib n + ∑ k in Finset.range n, fib k + 1 = ∑ k in Finset.range (n + 1), fib k + 1