tasksource/leandojo huggingface dataset:
Theorem: Decidable.or_congr_right'
File: Std/Logic.lean

tactic: rw [or_iff_not_imp_left, or_iff_not_imp_left]
state_before: a b c : Prop
inst✝ : Decidable a
h : ¬a → (b ↔ c)
⊢ a ∨ b ↔ a ∨ c

tactic: exact imp_congr_right h
state_before: a b c : Prop
inst✝ : Decidable a
h : ¬a → (b ↔ c)
⊢ ¬a → b ↔ ¬a → c
Theorem: Rat.num_div_eq_of_coprime
File: Mathlib/Data/Rat/Lemmas.lean

tactic: rw [←Int.natAbs_of_nonneg hb0.le, ← Rat.divInt_eq_div,
  ←mk_eq_divInt _ _ (Int.natAbs_ne_zero.mpr hb0.ne') h]
state_before: a b : ℤ
hb0 : 0 < b
h : Nat.coprime (Int.natAbs a) (Int.natAbs b)
⊢ (↑a / ↑b).num = a
Theorem: CategoryTheory.Simple.not_isZero
File: Mathlib/CategoryTheory/Simple.lean

tactic: simpa [Limits.IsZero.iff_id_eq_zero] using id_nonzero X
state_before: C : Type u
inst✝² : Category C
inst✝¹ : HasZeroMorphisms C
X : C
inst✝ : Simple X
⊢ ¬IsZero X
Theorem: List.reverse_range'
File: Std/Data/List/Lemmas.lean

tactic: rw [range'_1_concat, reverse_append, range_succ_eq_map,
  show s + (n + 1) - 1 = s + n from rfl, map, map_map]
state_before: s n : Nat
⊢ reverse (range' s (n + 1)) = map (fun x => s + (n + 1) - 1 - x) (range (n + 1))

tactic: simp [reverse_range', Nat.sub_right_comm]
state_before: s n : Nat
⊢ reverse [s + n] ++ reverse (range' s n) = (s + n - 0) :: map ((fun x => s + n - x) ∘ succ) (range n)

tactic: rfl
state_before: s n : Nat
⊢ map (fun x => s + n - x - 1) (range n) = map ((fun x => s + n - x) ∘ succ) (range n)
Theorem: LieModule.ideal_oper_maxTrivSubmodule_eq_bot
File: Mathlib/Algebra/Lie/Abelian.lean

tactic: rw [← LieSubmodule.coe_toSubmodule_eq_iff, LieSubmodule.lieIdeal_oper_eq_linear_span,
  LieSubmodule.bot_coeSubmodule, Submodule.span_eq_bot]
state_before: R : Type u
L : Type v
M : Type w
N : Type w₁
inst✝¹⁰ : CommRing R
inst✝⁹ : LieRing L
inst✝⁸ : LieAlgebra R L
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup N
inst✝² : Module R N
inst✝¹ : LieRingModule L N
inst✝ : LieModule R L N
I : LieIdeal R L
⊢ ⁅I, maxTrivSubmodule R L M⁆ = ⊥

tactic: rintro m ⟨⟨x, hx⟩, ⟨⟨m, hm⟩, rfl⟩⟩
state_before: R : Type u
L : Type v
M : Type w
N : Type w₁
inst✝¹⁰ : CommRing R
inst✝⁹ : LieRing L
inst✝⁸ : LieAlgebra R L
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup N
inst✝² : Module R N
inst✝¹ : LieRingModule L N
inst✝ : LieModule R L N
I : LieIdeal R L
⊢ ∀ (x : M), x ∈ {m | ∃ x n, ⁅↑x, ↑n⁆ = m} → x = 0

tactic: exact hm x
state_before: case intro.mk.intro.mk
R : Type u
L : Type v
M : Type w
N : Type w₁
inst✝¹⁰ : CommRing R
inst✝⁹ : LieRing L
inst✝⁸ : LieAlgebra R L
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup N
inst✝² : Module R N
inst✝¹ : LieRingModule L N
inst✝ : LieModule R L N
I : LieIdeal R L
x : L
hx : x ∈ I
m : M
hm : m ∈ maxTrivSubmodule R L M
⊢ ⁅↑{ val := x, property := hx }, ↑{ val := m, property := hm }⁆ = 0
Theorem: Wcovby.Ioc_subset
File: Mathlib/Order/Cover.lean

tactic: rw [← Icc_diff_left, h.Icc_eq, diff_singleton_subset_iff]
state_before: α : Type u_1
β : Type ?u.17648
inst✝ : PartialOrder α
a b c : α
h : a ⩿ b
⊢ Ioc a b ⊆ {b}
Theorem: CategoryTheory.ProjectiveResolution.homotopyEquiv_hom_π
File: Mathlib/CategoryTheory/Preadditive/ProjectiveResolution.lean

tactic: simp [homotopyEquiv]
state_before: C : Type u
inst✝⁴ : Category C
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : HasEqualizers C
inst✝ : HasImages C
X : C
P Q : ProjectiveResolution X
⊢ (homotopyEquiv P Q).hom ≫ Q.π = P.π
Theorem: Finmap.lookup_union_left_of_not_in
File: Mathlib/Data/Finmap.lean

tactic: by_cases h' : a ∈ s₁
state_before: α : Type u
β : α → Type v
inst✝ : DecidableEq α
a : α
s₁ s₂ : Finmap β
h : ¬a ∈ s₂
⊢ lookup a (s₁ ∪ s₂) = lookup a s₁

tactic: rw [lookup_union_left h']
state_before: case pos
α : Type u
β : α → Type v
inst✝ : DecidableEq α
a : α
s₁ s₂ : Finmap β
h : ¬a ∈ s₂
h' : a ∈ s₁
⊢ lookup a (s₁ ∪ s₂) = lookup a s₁

tactic: rw [lookup_union_right h', lookup_eq_none.mpr h, lookup_eq_none.mpr h']
state_before: case neg
α : Type u
β : α → Type v
inst✝ : DecidableEq α
a : α
s₁ s₂ : Finmap β
h : ¬a ∈ s₂
h' : ¬a ∈ s₁
⊢ lookup a (s₁ ∪ s₂) = lookup a s₁
Theorem: WellFounded.recursion
File: src/lean/Init/WF.lean

tactic: induction (apply hwf a) with
| intro x₁ _ ih => exact h x₁ ih
state_before: α : Sort u
r : α → α → Prop
hwf : WellFounded r
C : α → Sort v
a : α
h : (x : α) → ((y : α) → r y x → C y) → C x
⊢ C a

tactic: exact h x₁ ih
state_before: case intro
α : Sort u
r : α → α → Prop
hwf : WellFounded r
C : α → Sort v
a : α
h : (x : α) → ((y : α) → r y x → C y) → C x
x₁ : α
h✝ : ∀ (y : α), r y x₁ → Acc r y
ih : (y : α) → r y x₁ → C y
⊢ C x₁
Theorem: deriv.neg
File: Mathlib/Analysis/Calculus/Deriv/Add.lean

tactic: simp only [deriv, fderiv_neg, ContinuousLinearMap.neg_apply]
state_before: 𝕜 : Type u
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type v
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type w
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L : Filter 𝕜
⊢ deriv (fun y => -f y) x = -deriv f x
Theorem: Polynomial.leadingCoeff_X_pow
File: Mathlib/Data/Polynomial/Degree/Definitions.lean

tactic: simpa only [C_1, one_mul] using leadingCoeff_C_mul_X_pow (1 : R) n
state_before: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p q : R[X]
ι : Type ?u.643985
n : ℕ
⊢ leadingCoeff (X ^ n) = 1
Theorem: spectrum.nonzero_mul_eq_swap_mul
File: Mathlib/Algebra/Algebra/Spectrum.lean

tactic: suffices h : ∀ x y : A, σ (x * y) \ {0} ⊆ σ (y * x) \ {0}
state_before: 𝕜 : Type u
A : Type v
inst✝² : Field 𝕜
inst✝¹ : Ring A
inst✝ : Algebra 𝕜 A
a b : A
⊢ σ (a * b) \ {0} = σ (b * a) \ {0}

tactic: exact Set.eq_of_subset_of_subset (h a b) (h b a)
state_before: 𝕜 : Type u
A : Type v
inst✝² : Field 𝕜
inst✝¹ : Ring A
inst✝ : Algebra 𝕜 A
a b : A
h : ∀ (x y : A), σ (x * y) \ {0} ⊆ σ (y * x) \ {0}
⊢ σ (a * b) \ {0} = σ (b * a) \ {0}

tactic: rintro _ _ k ⟨k_mem, k_neq⟩
state_before: case h
𝕜 : Type u
A : Type v
inst✝² : Field 𝕜
inst✝¹ : Ring A
inst✝ : Algebra 𝕜 A
a b : A
⊢ ∀ (x y : A), σ (x * y) \ {0} ⊆ σ (y * x) \ {0}

tactic: change ((Units.mk0 k k_neq) : 𝕜) ∈ _ at k_mem
state_before: case h.intro
𝕜 : Type u
A : Type v
inst✝² : Field 𝕜
inst✝¹ : Ring A
inst✝ : Algebra 𝕜 A
a b x✝ y✝ : A
k : 𝕜
k_mem : k ∈ σ (x✝ * y✝)
k_neq : ¬k ∈ {0}
⊢ k ∈ σ (y✝ * x✝) \ {0}

tactic: exact ⟨unit_mem_mul_iff_mem_swap_mul.mp k_mem, k_neq⟩
state_before: case h.intro
𝕜 : Type u
A : Type v
inst✝² : Field 𝕜
inst✝¹ : Ring A
inst✝ : Algebra 𝕜 A
a b x✝ y✝ : A
k : 𝕜
k_neq : ¬k ∈ {0}
k_mem : ↑(Units.mk0 k k_neq) ∈ σ (x✝ * y✝)
⊢ k ∈ σ (y✝ * x✝) \ {0}
Theorem: Metric.continuousOn_iff'
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: simp [ContinuousOn, continuousWithinAt_iff']
state_before: α : Type u
β : Type v
X : Type ?u.128835
ι : Type ?u.128838
inst✝¹ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s✝ : Set α
inst✝ : TopologicalSpace β
f : β → α
s : Set β
⊢ ContinuousOn f s ↔ ∀ (b : β), b ∈ s → ∀ (ε : ℝ), ε > 0 → ∀ᶠ (x : β) in 𝓝[s] b, dist (f x) (f b) < ε
Theorem: Metric.diam_closure
File: Mathlib/Topology/Instances/ENNReal.lean

tactic: simp only [Metric.diam, EMetric.diam_closure]
state_before: α✝ : Type ?u.431607
β : Type ?u.431610
γ : Type ?u.431613
inst✝¹ : PseudoEMetricSpace α✝
α : Type u_1
inst✝ : PseudoMetricSpace α
s : Set α
⊢ diam (closure s) = diam s
Theorem: AddGroupFilterBasis.cauchy_iff
File: Mathlib/Topology/Algebra/UniformFilterBasis.lean

tactic: letI := B.uniformSpace
state_before: G : Type u_1
inst✝ : AddCommGroup G
B : AddGroupFilterBasis G
F : Filter G
⊢ Cauchy F ↔ NeBot F ∧ ∀ (U : Set G), U ∈ B → ∃ M, M ∈ F ∧ ∀ (x : G), x ∈ M → ∀ (y : G), y ∈ M → y - x ∈ U

tactic: haveI := B.uniformAddGroup
state_before: G : Type u_1
inst✝ : AddCommGroup G
B : AddGroupFilterBasis G
F : Filter G
this : UniformSpace G := AddGroupFilterBasis.uniformSpace B
⊢ Cauchy F ↔ NeBot F ∧ ∀ (U : Set G), U ∈ B → ∃ M, M ∈ F ∧ ∀ (x : G), x ∈ M → ∀ (y : G), y ∈ M → y - x ∈ U

tactic: suffices F ×ˢ F ≤ uniformity G ↔ ∀ U ∈ B, ∃ M ∈ F, ∀ (x) (_ : x ∈ M) (y) (_ : y ∈ M), y - x ∈ U by
  constructor <;> rintro ⟨h', h⟩ <;> refine' ⟨h', _⟩ <;> [rwa [← this]; rwa [this]]
state_before: G : Type u_1
inst✝ : AddCommGroup G
B : AddGroupFilterBasis G
F : Filter G
this✝ : UniformSpace G := AddGroupFilterBasis.uniformSpace B
this : UniformAddGroup G
⊢ Cauchy F ↔ NeBot F ∧ ∀ (U : Set G), U ∈ B → ∃ M, M ∈ F ∧ ∀ (x : G), x ∈ M → ∀ (y : G), y ∈ M → y - x ∈ U

tactic: rw [uniformity_eq_comap_nhds_zero G, ← map_le_iff_le_comap]
state_before: G : Type u_1
inst✝ : AddCommGroup G
B : AddGroupFilterBasis G
F : Filter G
this✝ : UniformSpace G := AddGroupFilterBasis.uniformSpace B
this : UniformAddGroup G
⊢ F ×ˢ F ≤ uniformity G ↔ ∀ (U : Set G), U ∈ B → ∃ M, M ∈ F ∧ ∀ (x : G), x ∈ M → ∀ (y : G), y ∈ M → y - x ∈ U

tactic: change Tendsto _ _ _ ↔ _
state_before: G : Type u_1
inst✝ : AddCommGroup G
B : AddGroupFilterBasis G
F : Filter G
this✝ : UniformSpace G := AddGroupFilterBasis.uniformSpace B
this : UniformAddGroup G
⊢ map (fun x => x.snd - x.fst) (F ×ˢ F) ≤ nhds 0 ↔
    ∀ (U : Set G), U ∈ B → ∃ M, M ∈ F ∧ ∀ (x : G), x ∈ M → ∀ (y : G), y ∈ M → y - x ∈ U

tactic: simp [(basis_sets F).prod_self.tendsto_iff B.nhds_zero_hasBasis, @forall_swap (_ ∈ _) G]
state_before: G : Type u_1
inst✝ : AddCommGroup G
B : AddGroupFilterBasis G
F : Filter G
this✝ : UniformSpace G := AddGroupFilterBasis.uniformSpace B
this : UniformAddGroup G
⊢ Tendsto (fun x => x.snd - x.fst) (F ×ˢ F) (nhds 0) ↔
    ∀ (U : Set G), U ∈ B → ∃ M, M ∈ F ∧ ∀ (x : G), x ∈ M → ∀ (y : G), y ∈ M → y - x ∈ U

tactic: constructor <;> rintro ⟨h', h⟩ <;> refine' ⟨h', _⟩ <;> [rwa [← this]; rwa [this]]
state_before: G : Type u_1
inst✝ : AddCommGroup G
B : AddGroupFilterBasis G
F : Filter G
this✝¹ : UniformSpace G := AddGroupFilterBasis.uniformSpace B
this✝ : UniformAddGroup G
this : F ×ˢ F ≤ uniformity G ↔ ∀ (U : Set G), U ∈ B → ∃ M, M ∈ F ∧ ∀ (x : G), x ∈ M → ∀ (y : G), y ∈ M → y - x ∈ U
⊢ Cauchy F ↔ NeBot F ∧ ∀ (U : Set G), U ∈ B → ∃ M, M ∈ F ∧ ∀ (x : G), x ∈ M → ∀ (y : G), y ∈ M → y - x ∈ U
Theorem: Nat.bit0_mod_two
File: Mathlib/Data/Nat/Bits.lean

tactic: rw [Nat.mod_two_of_bodd]
state_before: n : ℕ
⊢ bit0 n % 2 = 0

tactic: simp
state_before: n : ℕ
⊢ (bif bodd (bit0 n) then 1 else 0) = 0
Theorem: star_exp
File: Mathlib/Analysis/NormedSpace/Exponential.lean

tactic: simp_rw [exp_eq_tsum, ← star_pow, ← star_inv_nat_cast_smul, ← tsum_star]
state_before: 𝕂 : Type u_2
𝔸 : Type u_1
inst✝⁷ : Field 𝕂
inst✝⁶ : Ring 𝔸
inst✝⁵ : Algebra 𝕂 𝔸
inst✝⁴ : TopologicalSpace 𝔸
inst✝³ : TopologicalRing 𝔸
inst✝² : T2Space 𝔸
inst✝¹ : StarRing 𝔸
inst✝ : ContinuousStar 𝔸
x : 𝔸
⊢ star (exp 𝕂 x) = exp 𝕂 (star x)
Theorem: Set.insert_diff_singleton_comm
File: Mathlib/Data/Set/Basic.lean

tactic: simp_rw [← union_singleton, union_diff_distrib,
  diff_singleton_eq_self (mem_singleton_iff.not.2 hab.symm)]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t t₁ t₂ u : Set α
hab : a ≠ b
s : Set α
⊢ insert a (s \ {b}) = insert a s \ {b}
Theorem: Finset.mulSupport_of_fiberwise_prod_subset_image
File: Mathlib/Algebra/BigOperators/Finprod.lean

tactic: simp only [Finset.coe_image, Set.mem_image, Finset.mem_coe, Function.support_subset_iff]
state_before: α : Type u_2
β : Type u_1
ι : Type ?u.393586
G : Type ?u.393589
M : Type u_3
N : Type ?u.393595
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
f✝ g✝ : α → M
a b : α
s✝ t : Set α
inst✝ : DecidableEq β
s : Finset α
f : α → M
g : α → β
⊢ (mulSupport fun b => Finset.prod (filter (fun a => g a = b) s) f) ⊆ ↑(image g s)

tactic: intro b h
state_before: α : Type u_2
β : Type u_1
ι : Type ?u.393586
G : Type ?u.393589
M : Type u_3
N : Type ?u.393595
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
f✝ g✝ : α → M
a b : α
s✝ t : Set α
inst✝ : DecidableEq β
s : Finset α
f : α → M
g : α → β
⊢ (mulSupport fun b => Finset.prod (filter (fun a => g a = b) s) f) ⊆ g '' ↑s

tactic: suffices (s.filter fun a : α => g a = b).Nonempty by
  simpa only [s.fiber_nonempty_iff_mem_image g b, Finset.mem_image, exists_prop]
state_before: α : Type u_2
β : Type u_1
ι : Type ?u.393586
G : Type ?u.393589
M : Type u_3
N : Type ?u.393595
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
f✝ g✝ : α → M
a b✝ : α
s✝ t : Set α
inst✝ : DecidableEq β
s : Finset α
f : α → M
g : α → β
b : β
h : b ∈ mulSupport fun b => Finset.prod (filter (fun a => g a = b) s) f
⊢ b ∈ g '' ↑s

tactic: exact Finset.nonempty_of_prod_ne_one h
state_before: α : Type u_2
β : Type u_1
ι : Type ?u.393586
G : Type ?u.393589
M : Type u_3
N : Type ?u.393595
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
f✝ g✝ : α → M
a b✝ : α
s✝ t : Set α
inst✝ : DecidableEq β
s : Finset α
f : α → M
g : α → β
b : β
h : b ∈ mulSupport fun b => Finset.prod (filter (fun a => g a = b) s) f
⊢ Finset.Nonempty (filter (fun a => g a = b) s)

tactic: simpa only [s.fiber_nonempty_iff_mem_image g b, Finset.mem_image, exists_prop]
state_before: α : Type u_2
β : Type u_1
ι : Type ?u.393586
G : Type ?u.393589
M : Type u_3
N : Type ?u.393595
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
f✝ g✝ : α → M
a b✝ : α
s✝ t : Set α
inst✝ : DecidableEq β
s : Finset α
f : α → M
g : α → β
b : β
h : b ∈ mulSupport fun b => Finset.prod (filter (fun a => g a = b) s) f
this : Finset.Nonempty (filter (fun a => g a = b) s)
⊢ b ∈ g '' ↑s
Theorem: Set.image_eq_iUnion
File: Mathlib/Data/Set/Lattice.lean

tactic: simp [@eq_comm β b]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.200788
ι : Sort ?u.200791
ι' : Sort ?u.200794
ι₂ : Sort ?u.200797
κ : ι → Sort ?u.200802
κ₁ : ι → Sort ?u.200807
κ₂ : ι → Sort ?u.200812
κ' : ι' → Sort ?u.200817
f : α → β
s : Set α
b : β
⊢ b ∈ f '' s ↔ b ∈ ⋃ (i : α) (_ : i ∈ s), {f i}
Theorem: Complex.log_conj_eq_ite
File: Mathlib/Analysis/SpecialFunctions/Complex/Log.lean

tactic: simp_rw [log, abs_conj, arg_conj, map_add, map_mul, conj_ofReal]
state_before: x : ℂ
⊢ log (↑(starRingEnd ℂ) x) = if arg x = π then log x else ↑(starRingEnd ℂ) (log x)

tactic: split_ifs with hx
state_before: x : ℂ
⊢ ↑(Real.log (↑abs x)) + ↑(if arg x = π then π else -arg x) * I =
    if arg x = π then ↑(Real.log (↑abs x)) + ↑(arg x) * I else ↑(Real.log (↑abs x)) + ↑(arg x) * ↑(starRingEnd ℂ) I

tactic: simp_rw [ofReal_neg, conj_I, mul_neg, neg_mul]
state_before: case inr
x : ℂ
hx : ¬arg x = π
⊢ ↑(Real.log (↑abs x)) + ↑(-arg x) * I = ↑(Real.log (↑abs x)) + ↑(arg x) * ↑(starRingEnd ℂ) I

tactic: rw [hx]
state_before: case inl
x : ℂ
hx : arg x = π
⊢ ↑(Real.log (↑abs x)) + ↑π * I = ↑(Real.log (↑abs x)) + ↑(arg x) * I
Theorem: List.tail_drop
File: Mathlib/Data/List/Basic.lean

tactic: induction' l with hd tl hl generalizing n
state_before: ι : Type ?u.199621
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ l : List α
n : ℕ
⊢ tail (drop n l) = drop (n + 1) l

tactic: simp
state_before: case nil
ι : Type ?u.199621
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
n✝ n : ℕ
⊢ tail (drop n []) = drop (n + 1) []

tactic: cases n
state_before: case cons
ι : Type ?u.199621
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
n✝ : ℕ
hd : α
tl : List α
hl : ∀ (n : ℕ), tail (drop n tl) = drop (n + 1) tl
n : ℕ
⊢ tail (drop n (hd :: tl)) = drop (n + 1) (hd :: tl)

tactic: simp
state_before: case cons.zero
ι : Type ?u.199621
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
n : ℕ
hd : α
tl : List α
hl : ∀ (n : ℕ), tail (drop n tl) = drop (n + 1) tl
⊢ tail (drop zero (hd :: tl)) = drop (zero + 1) (hd :: tl)

tactic: simp [hl]
state_before: case cons.succ
ι : Type ?u.199621
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
n : ℕ
hd : α
tl : List α
hl : ∀ (n : ℕ), tail (drop n tl) = drop (n + 1) tl
n✝ : ℕ
⊢ tail (drop (succ n✝) (hd :: tl)) = drop (succ n✝ + 1) (hd :: tl)
Theorem: Stream'.mem_cycle
File: Mathlib/Data/Stream/Init.lean

tactic: rw [cycle_eq]
state_before: α : Type u
β : Type v
δ : Type w
a : α
l : List α
h : l ≠ []
ainl : a ∈ l
⊢ a ∈ cycle l h

tactic: exact mem_append_stream_left _ ainl
state_before: α : Type u
β : Type v
δ : Type w
a : α
l : List α
h : l ≠ []
ainl : a ∈ l
⊢ a ∈ l ++ₛ cycle l h
Theorem: Turing.ListBlank.nth_map
File: Mathlib/Computability/TuringMachine.lean

tactic: refine' l.inductionOn fun l ↦ _
state_before: Γ : Type u_1
Γ' : Type u_2
inst✝¹ : Inhabited Γ
inst✝ : Inhabited Γ'
f : PointedMap Γ Γ'
l : ListBlank Γ
n : ℕ
⊢ nth (map f l) n = PointedMap.f f (nth l n)

tactic: suffices ((mk l).map f).nth n = f ((mk l).nth n) by exact this
state_before: Γ : Type u_1
Γ' : Type u_2
inst✝¹ : Inhabited Γ
inst✝ : Inhabited Γ'
f : PointedMap Γ Γ'
l✝ : ListBlank Γ
n : ℕ
l : List Γ
⊢ nth (map f (Quotient.mk (BlankRel.setoid Γ) l)) n = PointedMap.f f (nth (Quotient.mk (BlankRel.setoid Γ) l) n)

tactic: simp only [List.get?_map, ListBlank.map_mk, ListBlank.nth_mk, List.getI_eq_iget_get?]
state_before: Γ : Type u_1
Γ' : Type u_2
inst✝¹ : Inhabited Γ
inst✝ : Inhabited Γ'
f : PointedMap Γ Γ'
l✝ : ListBlank Γ
n : ℕ
l : List Γ
⊢ nth (map f (mk l)) n = PointedMap.f f (nth (mk l) n)

tactic: cases l.get? n
state_before: Γ : Type u_1
Γ' : Type u_2
inst✝¹ : Inhabited Γ
inst✝ : Inhabited Γ'
f : PointedMap Γ Γ'
l✝ : ListBlank Γ
n : ℕ
l : List Γ
⊢ Option.iget (Option.map f.f (List.get? l n)) = PointedMap.f f (Option.iget (List.get? l n))

tactic: exact this
state_before: Γ : Type u_1
Γ' : Type u_2
inst✝¹ : Inhabited Γ
inst✝ : Inhabited Γ'
f : PointedMap Γ Γ'
l✝ : ListBlank Γ
n : ℕ
l : List Γ
this : nth (map f (mk l)) n = PointedMap.f f (nth (mk l) n)
⊢ nth (map f (Quotient.mk (BlankRel.setoid Γ) l)) n = PointedMap.f f (nth (Quotient.mk (BlankRel.setoid Γ) l) n)

tactic: exact f.2.symm
state_before: case none
Γ : Type u_1
Γ' : Type u_2
inst✝¹ : Inhabited Γ
inst✝ : Inhabited Γ'
f : PointedMap Γ Γ'
l✝ : ListBlank Γ
n : ℕ
l : List Γ
⊢ Option.iget (Option.map f.f none) = PointedMap.f f (Option.iget none)

tactic: rfl
state_before: case some
Γ : Type u_1
Γ' : Type u_2
inst✝¹ : Inhabited Γ
inst✝ : Inhabited Γ'
f : PointedMap Γ Γ'
l✝ : ListBlank Γ
n : ℕ
l : List Γ
val✝ : Γ
⊢ Option.iget (Option.map f.f (some val✝)) = PointedMap.f f (Option.iget (some val✝))
Theorem: Ordnode.Bounded.to_sep
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: refine h₁.mem_lt.imp fun y yx => ?_
state_before: α : Type u_1
inst✝ : Preorder α
t₁ t₂ : Ordnode α
o₁ : WithBot α
o₂ : WithTop α
x : α
h₁ : Bounded t₁ o₁ ↑x
h₂ : Bounded t₂ (↑x) o₂
⊢ All (fun y => All (fun z => y < z) t₂) t₁

tactic: exact h₂.mem_gt.imp fun z xz => lt_trans yx xz
state_before: α : Type u_1
inst✝ : Preorder α
t₁ t₂ : Ordnode α
o₁ : WithBot α
o₂ : WithTop α
x : α
h₁ : Bounded t₁ o₁ ↑x
h₂ : Bounded t₂ (↑x) o₂
y : α
yx : y < x
⊢ All (fun z => y < z) t₂
Theorem: Nat.zero_land'
File: Mathlib/Data/Nat/Bitwise.lean

tactic: simp only [Nat.bitwise'_zero_left, Bool.cond_false, eq_self_iff_true, land', Bool.false_and]
state_before: n : ℕ
⊢ land' 0 n = 0
Theorem: CategoryTheory.wellPowered_of_isDetecting
File: Mathlib/CategoryTheory/Generator.lean

tactic: simpa [Set.ext_iff] using h
state_before: C : Type u₁
inst✝³ : Category C
D : Type u₂
inst✝² : Category D
inst✝¹ : HasPullbacks C
𝒢 : Set C
inst✝ : Small ↑𝒢
h𝒢 : IsDetecting 𝒢
X : C
P Q : Subobject X
h : (fun P => {f | Subobject.Factors P f.snd}) P = (fun P => {f | Subobject.Factors P f.snd}) Q
⊢ ∀ (G : C), G ∈ 𝒢 → ∀ {f : G ⟶ X}, Subobject.Factors P f ↔ Subobject.Factors Q f
Theorem: aeval_wittPolynomial
File: Mathlib/RingTheory/WittVector/WittPolynomial.lean

tactic: simp [wittPolynomial, AlgHom.map_sum, aeval_monomial, Finsupp.prod_single_index]
state_before: p : ℕ
R : Type u_2
inst✝⁴ : CommRing R
inst✝³ : DecidableEq R
S : Type ?u.129330
inst✝² : CommRing S
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra R A
f : ℕ → A
n : ℕ
⊢ ↑(aeval f) (W_ R n) = ∑ i in range (n + 1), ↑p ^ i * f i ^ p ^ (n - i)
Theorem: List.elem_eq_true_of_mem
File: src/lean/Init/Data/List/Basic.lean

tactic: induction h with
| head _ => simp [elem]
| tail _ _ ih => simp [elem]; split; rfl; assumption
state_before: α : Type u
β : Type v
γ : Type w
inst✝ : DecidableEq α
a : α
as : List α
h : a ∈ as
⊢ elem a as = true

tactic: simp [elem]
state_before: case head
α : Type u
β : Type v
γ : Type w
inst✝ : DecidableEq α
a : α
as as✝ : List α
⊢ elem a (a :: as✝) = true

tactic: simp [elem]
state_before: case tail
α : Type u
β : Type v
γ : Type w
inst✝ : DecidableEq α
a : α
as : List α
b✝ : α
as✝ : List α
a✝ : Mem a as✝
ih : elem a as✝ = true
⊢ elem a (b✝ :: as✝) = true

tactic: split
state_before: case tail
α : Type u
β : Type v
γ : Type w
inst✝ : DecidableEq α
a : α
as : List α
b✝ : α
as✝ : List α
a✝ : Mem a as✝
ih : elem a as✝ = true
⊢ (match a == b✝ with
    | true => true
    | false => elem a as✝) =
    true

tactic: rfl
state_before: case tail.h_1
α : Type u
β : Type v
γ : Type w
inst✝ : DecidableEq α
a : α
as : List α
b✝ : α
as✝ : List α
a✝ : Mem a as✝
ih : elem a as✝ = true
x✝ : Bool
heq✝ : (a == b✝) = true
⊢ true = true

case tail.h_2
α : Type u
β : Type v
γ : Type w
inst✝ : DecidableEq α
a : α
as : List α
b✝ : α
as✝ : List α
a✝ : Mem a as✝
ih : elem a as✝ = true
x✝ : Bool
heq✝ : (a == b✝) = false
⊢ elem a as✝ = true

tactic: assumption
state_before: case tail.h_2
α : Type u
β : Type v
γ : Type w
inst✝ : DecidableEq α
a : α
as : List α
b✝ : α
as✝ : List α
a✝ : Mem a as✝
ih : elem a as✝ = true
x✝ : Bool
heq✝ : (a == b✝) = false
⊢ elem a as✝ = true
Theorem: dist_partial_sum
File: Mathlib/Analysis/SpecificLimits/Normed.lean

tactic: simp [dist_eq_norm, sum_range_succ]
state_before: α : Type u_1
β : Type ?u.752534
ι : Type ?u.752537
inst✝ : SeminormedAddCommGroup α
r C : ℝ
f u : ℕ → α
n : ℕ
⊢ dist (∑ k in Finset.range (n + 1), u k) (∑ k in Finset.range n, u k) = ‖u n‖
Theorem: spectrum.resolventSet_of_subsingleton
File: Mathlib/Algebra/Algebra/Spectrum.lean

tactic: simp_rw [resolventSet, Subsingleton.elim (algebraMap R A _ - a) 1, isUnit_one, Set.setOf_true]
state_before: R : Type u
A : Type v
inst✝³ : CommSemiring R
inst✝² : Ring A
inst✝¹ : Algebra R A
inst✝ : Subsingleton A
a : A
⊢ resolventSet R a = univ
Theorem: Finset.image_insert
File: Mathlib/Data/Finset/Image.lean

tactic: simp only [insert_eq, image_singleton, image_union]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.89987
inst✝¹ : DecidableEq β
f✝ g : α → β
s✝ : Finset α
t : Finset β
a✝ : α
b c : β
inst✝ : DecidableEq α
f : α → β
a : α
s : Finset α
⊢ image f (insert a s) = insert (f a) (image f s)
Theorem: Real.cos_neg
File: Mathlib/Data/Complex/Exponential.lean

tactic: simp [cos, exp_neg]
state_before: x y : ℝ
⊢ cos (-x) = cos x
Theorem: List.foldl_argAux_eq_none
File: Mathlib/Data/List/MinMax.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.246
r : α → α → Prop
inst✝ : DecidableRel r
l : List α
o : Option α
a m : α
⊢ foldl (argAux r) o [] = none ↔ [] = [] ∧ o = none

tactic: simp [argAux]
state_before: α : Type u_1
β : Type ?u.246
r : α → α → Prop
inst✝ : DecidableRel r
l : List α
o : Option α
a m : α
tl : List α
hd : α
⊢ (foldl (argAux r) o tl = none ↔ tl = [] ∧ o = none) →
    (foldl (argAux r) o (tl ++ [hd]) = none ↔ tl ++ [hd] = [] ∧ o = none)

tactic: cases foldl (argAux r) o tl <;> simp
state_before: α : Type u_1
β : Type ?u.246
r : α → α → Prop
inst✝ : DecidableRel r
l : List α
o : Option α
a m : α
tl : List α
hd : α
⊢ (foldl (fun a b => Option.rec (some b) (fun val => if r b val then some b else some val) a) o tl = none ↔
      tl = [] ∧ o = none) →
    ¬Option.rec (some hd) (fun val => if r hd val then some hd else some val)
          (foldl (fun a b => Option.rec (some b) (fun val => if r b val then some b else some val) a) o tl) =
        none

tactic: try split_ifs <;> simp
state_before: case some
α : Type u_1
β : Type ?u.246
r : α → α → Prop
inst✝ : DecidableRel r
l : List α
o : Option α
a m : α
tl : List α
hd val✝ : α
⊢ (tl = [] → ¬o = none) → ¬(if r hd val✝ then some hd else some val✝) = none

tactic: split_ifs <;> simp
state_before: case some
α : Type u_1
β : Type ?u.246
r : α → α → Prop
inst✝ : DecidableRel r
l : List α
o : Option α
a m : α
tl : List α
hd val✝ : α
⊢ (tl = [] → ¬o = none) → ¬(if r hd val✝ then some hd else some val✝) = none