tasksource/leandojo huggingface dataset:
Theorem: edist_smul₀
File: Mathlib/Analysis/Normed/MulAction.lean

tactic: simp only [edist_nndist, nndist_smul₀, ENNReal.coe_mul, ENNReal.smul_def, smul_eq_mul]
state_before: α : Type u_2
β : Type u_1
inst✝³ : NormedDivisionRing α
inst✝² : SeminormedAddCommGroup β
inst✝¹ : Module α β
inst✝ : BoundedSMul α β
s : α
x y : β
⊢ edist (s • x) (s • y) = ‖s‖₊ • edist x y
Theorem: sdiff_inf_self_right
File: Mathlib/Order/Heyting/Basic.lean

tactic: rw [sdiff_inf, sdiff_self, sup_bot_eq]
state_before: ι : Type ?u.139011
α : Type u_1
β : Type ?u.139017
inst✝ : GeneralizedCoheytingAlgebra α
a✝ b✝ c d a b : α
⊢ b \ (a ⊓ b) = b \ a
Theorem: isOpenMap_inr
File: Mathlib/Topology/Constructions.lean

tactic: simpa [isOpen_sum_iff, preimage_image_eq u Sum.inr_injective]
state_before: α : Type u
β : Type v
γ : Type ?u.120234
δ : Type ?u.120237
ε : Type ?u.120240
ζ : Type ?u.120243
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
u : Set β
hu : IsOpen u
⊢ IsOpen (inr '' u)
Theorem: CauSeq.sup_eq_left
File: Mathlib/Data/Real/CauSeq.lean

tactic: simpa only [CauSeq.sup_comm] using CauSeq.sup_eq_right h
state_before: α : Type u_1
inst✝ : LinearOrderedField α
a b : CauSeq α abs
h : b ≤ a
⊢ a ⊔ b ≈ a
Theorem: Nat.count_monotone
File: Mathlib/Data/Nat/Count.lean

tactic: by_cases h : p n <;> simp [count_succ, h]
state_before: p : ℕ → Prop
inst✝ : DecidablePred p
n : ℕ
⊢ count p n ≤ count p (n + 1)
Theorem: Function.extend_div
File: Mathlib/Data/Pi/Algebra.lean

tactic: classical
funext x
simp [Function.extend_def, apply_dite₂]
state_before: I : Type u
α : Type u_3
β : Type u_2
γ : Type u_1
f✝ : I → Type v₁
g : I → Type v₂
h : I → Type v₃
x y : (i : I) → f✝ i
i : I
inst✝ : Div γ
f : α → β
g₁ g₂ : α → γ
e₁ e₂ : β → γ
⊢ extend f (g₁ / g₂) (e₁ / e₂) = extend f g₁ e₁ / extend f g₂ e₂

tactic: funext x
state_before: I : Type u
α : Type u_3
β : Type u_2
γ : Type u_1
f✝ : I → Type v₁
g : I → Type v₂
h : I → Type v₃
x y : (i : I) → f✝ i
i : I
inst✝ : Div γ
f : α → β
g₁ g₂ : α → γ
e₁ e₂ : β → γ
⊢ extend f (g₁ / g₂) (e₁ / e₂) = extend f g₁ e₁ / extend f g₂ e₂

tactic: simp [Function.extend_def, apply_dite₂]
state_before: case h
I : Type u
α : Type u_3
β : Type u_2
γ : Type u_1
f✝ : I → Type v₁
g : I → Type v₂
h : I → Type v₃
x✝ y : (i : I) → f✝ i
i : I
inst✝ : Div γ
f : α → β
g₁ g₂ : α → γ
e₁ e₂ : β → γ
x : β
⊢ extend f (g₁ / g₂) (e₁ / e₂) x = (extend f g₁ e₁ / extend f g₂ e₂) x
Theorem: Function.Semiconj.iterate_left
File: Mathlib/Logic/Function/Iterate.lean

tactic: induction' n with n ihn generalizing k
state_before: α : Type u
β : Type v
f : α → α
g : ℕ → α → α
H : ∀ (n : ℕ), Semiconj f (g n) (g (n + 1))
n k : ℕ
⊢ Semiconj (f^[n]) (g k) (g (n + k))

tactic: rw [Nat.zero_add]
state_before: case zero
α : Type u
β : Type v
f : α → α
g : ℕ → α → α
H : ∀ (n : ℕ), Semiconj f (g n) (g (n + 1))
k✝ k : ℕ
⊢ Semiconj (f^[Nat.zero]) (g k) (g (Nat.zero + k))

tactic: exact id_left
state_before: case zero
α : Type u
β : Type v
f : α → α
g : ℕ → α → α
H : ∀ (n : ℕ), Semiconj f (g n) (g (n + 1))
k✝ k : ℕ
⊢ Semiconj (f^[Nat.zero]) (g k) (g k)

tactic: rw [Nat.succ_eq_add_one, Nat.add_right_comm, Nat.add_assoc]
state_before: case succ
α : Type u
β : Type v
f : α → α
g : ℕ → α → α
H : ∀ (n : ℕ), Semiconj f (g n) (g (n + 1))
k✝ n : ℕ
ihn : ∀ (k : ℕ), Semiconj (f^[n]) (g k) (g (n + k))
k : ℕ
⊢ Semiconj (f^[Nat.succ n]) (g k) (g (Nat.succ n + k))

tactic: exact (H k).comp_left (ihn (k + 1))
state_before: case succ
α : Type u
β : Type v
f : α → α
g : ℕ → α → α
H : ∀ (n : ℕ), Semiconj f (g n) (g (n + 1))
k✝ n : ℕ
ihn : ∀ (k : ℕ), Semiconj (f^[n]) (g k) (g (n + k))
k : ℕ
⊢ Semiconj (f^[n + 1]) (g k) (g (n + (k + 1)))
Theorem: PGame.le_neg_iff
File: Mathlib/SetTheory/Game/PGame.lean

tactic: rw [← neg_neg x, neg_le_neg_iff, neg_neg]
state_before: x y : PGame
⊢ y ≤ -x ↔ x ≤ -y
Theorem: Real.dist_le_of_mem_pi_Icc
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: refine' (dist_pi_le_iff dist_nonneg).2 fun b =>
  (Real.dist_le_of_mem_uIcc _ _).trans (dist_le_pi_dist x' y' b) <;> refine' Icc_subset_uIcc _
state_before: α : Type u
β : Type v
X : Type ?u.429067
ι : Type ?u.429070
inst✝² : PseudoMetricSpace α
π : β → Type ?u.429078
inst✝¹ : Fintype β
inst✝ : (b : β) → PseudoMetricSpace (π b)
x y x' y' : β → ℝ
hx : x ∈ Set.Icc x' y'
hy : y ∈ Set.Icc x' y'
⊢ dist x y ≤ dist x' y'

tactic: exacts [⟨hx.1 _, hx.2 _⟩, ⟨hy.1 _, hy.2 _⟩]
state_before: case refine'_1
α : Type u
β : Type v
X : Type ?u.429067
ι : Type ?u.429070
inst✝² : PseudoMetricSpace α
π : β → Type ?u.429078
inst✝¹ : Fintype β
inst✝ : (b : β) → PseudoMetricSpace (π b)
x y x' y' : β → ℝ
hx : x ∈ Set.Icc x' y'
hy : y ∈ Set.Icc x' y'
b : β
⊢ x b ∈ Set.Icc (x' b) (y' b)

case refine'_2
α : Type u
β : Type v
X : Type ?u.429067
ι : Type ?u.429070
inst✝² : PseudoMetricSpace α
π : β → Type ?u.429078
inst✝¹ : Fintype β
inst✝ : (b : β) → PseudoMetricSpace (π b)
x y x' y' : β → ℝ
hx : x ∈ Set.Icc x' y'
hy : y ∈ Set.Icc x' y'
b : β
⊢ y b ∈ Set.Icc (x' b) (y' b)
Theorem: Cardinal.nat_eq_lift_iff
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: rw [← lift_natCast.{v,u} n, lift_inj]
state_before: α β : Type u
n : ℕ
a : Cardinal
⊢ ↑n = lift a ↔ ↑n = a
Theorem: MeasurableEmbedding.of_measurable_inverse_on_range
File: Mathlib/MeasureTheory/MeasurableSpace.lean

tactic: set e : α ≃ᵐ range f :=
  ⟨⟨rangeFactorization f, g, H, H.rightInverse_of_surjective surjective_onto_range⟩,
    hf₁.subtype_mk, hg⟩
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.879714
δ : Type ?u.879717
δ' : Type ?u.879720
ι : Sort uι
s t u : Set α
inst✝² : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
f : α → β
g✝ : β → α
g : ↑(range f) → α
hf₁ : Measurable f
hf₂ : MeasurableSet (range f)
hg : Measurable g
H : LeftInverse g (rangeFactorization f)
⊢ MeasurableEmbedding f

tactic: exact (MeasurableEmbedding.subtype_coe hf₂).comp e.measurableEmbedding
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.879714
δ : Type ?u.879717
δ' : Type ?u.879720
ι : Sort uι
s t u : Set α
inst✝² : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
f : α → β
g✝ : β → α
g : ↑(range f) → α
hf₁ : Measurable f
hf₂ : MeasurableSet (range f)
hg : Measurable g
H : LeftInverse g (rangeFactorization f)
e : α ≃ᵐ ↑(range f) :=
  {
    toEquiv :=
      { toFun := rangeFactorization f, invFun := g, left_inv := H,
        right_inv := (_ : Function.RightInverse g (rangeFactorization f)) },
    measurable_toFun := (_ : Measurable fun x => { val := f x, property := (_ : f x ∈ range f) }),
    measurable_invFun := hg }
⊢ MeasurableEmbedding f
Theorem: HahnSeries.embDomainRingHom_C
File: Mathlib/RingTheory/HahnSeries.lean

tactic: simp
state_before: Γ : Type u_2
R : Type u_1
inst✝² : OrderedCancelAddCommMonoid Γ
Γ' : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ'
inst✝ : NonAssocSemiring R
f : Γ →+ Γ'
hfi : Injective ↑f
hf : ∀ (g g' : Γ), ↑f g ≤ ↑f g' ↔ g ≤ g'
r : R
⊢ ↑(single (↑{ toEmbedding := { toFun := ↑f, inj' := hfi }, map_rel_iff' := (_ : ∀ {a b : Γ}, ↑f a ≤ ↑f b ↔ a ≤ b) } 0))
      r =
    ↑C r
Theorem: one_div_le_one_div_of_neg_of_le
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: rwa [div_le_iff_of_neg' hb, ← div_eq_mul_one_div, div_le_one_of_neg (h.trans_lt hb)]
state_before: ι : Type ?u.177416
α : Type u_1
β : Type ?u.177422
inst✝ : LinearOrderedField α
a b c d : α
n : ℤ
hb : b < 0
h : a ≤ b
⊢ 1 / b ≤ 1 / a
Theorem: String.Pos.addChar_right_comm
File: Std/Data/String/Lemmas.lean

tactic: apply ext
state_before: p : Pos
c₁ c₂ : Char
⊢ p + c₁ + c₂ = p + c₂ + c₁

tactic: repeat rw [pos_add_char]
state_before: case h
p : Pos
c₁ c₂ : Char
⊢ (p + c₁ + c₂).byteIdx = (p + c₂ + c₁).byteIdx

tactic: apply Nat.add_right_comm
state_before: case h
p : Pos
c₁ c₂ : Char
⊢ p.byteIdx + csize c₁ + csize c₂ = p.byteIdx + csize c₂ + csize c₁

tactic: rw [pos_add_char]
state_before: case h
p : Pos
c₁ c₂ : Char
⊢ p.byteIdx + csize c₁ + csize c₂ = p.byteIdx + csize c₂ + csize c₁
Theorem: convex_segment
File: Mathlib/Analysis/Convex/Basic.lean

tactic: rintro p ⟨ap, bp, hap, hbp, habp, rfl⟩ q ⟨aq, bq, haq, hbq, habq, rfl⟩ a b ha hb hab
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.24926
β : Type ?u.24929
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s : Set E
x✝ x y : E
⊢ Convex 𝕜 [x-[𝕜]y]

tactic: refine'
  ⟨a * ap + b * aq, a * bp + b * bq, add_nonneg (mul_nonneg ha hap) (mul_nonneg hb haq),
    add_nonneg (mul_nonneg ha hbp) (mul_nonneg hb hbq), _, _⟩
state_before: case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
𝕜 : Type u_1
E : Type u_2
F : Type ?u.24926
β : Type ?u.24929
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s : Set E
x✝ x y : E
ap bp : 𝕜
hap : 0 ≤ ap
hbp : 0 ≤ bp
habp : ap + bp = 1
aq bq : 𝕜
haq : 0 ≤ aq
hbq : 0 ≤ bq
habq : aq + bq = 1
a b : 𝕜
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ a • (ap • x + bp • y) + b • (aq • x + bq • y) ∈ [x-[𝕜]y]

tactic: rw [add_add_add_comm, ← mul_add, ← mul_add, habp, habq, mul_one, mul_one, hab]
state_before: case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1
𝕜 : Type u_1
E : Type u_2
F : Type ?u.24926
β : Type ?u.24929
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s : Set E
x✝ x y : E
ap bp : 𝕜
hap : 0 ≤ ap
hbp : 0 ≤ bp
habp : ap + bp = 1
aq bq : 𝕜
haq : 0 ≤ aq
hbq : 0 ≤ bq
habq : aq + bq = 1
a b : 𝕜
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ a * ap + b * aq + (a * bp + b * bq) = 1

tactic: simp_rw [add_smul, mul_smul, smul_add]
state_before: case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2
𝕜 : Type u_1
E : Type u_2
F : Type ?u.24926
β : Type ?u.24929
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s : Set E
x✝ x y : E
ap bp : 𝕜
hap : 0 ≤ ap
hbp : 0 ≤ bp
habp : ap + bp = 1
aq bq : 𝕜
haq : 0 ≤ aq
hbq : 0 ≤ bq
habq : aq + bq = 1
a b : 𝕜
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ (a * ap + b * aq) • x + (a * bp + b * bq) • y = a • (ap • x + bp • y) + b • (aq • x + bq • y)

tactic: exact add_add_add_comm _ _ _ _
state_before: case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2
𝕜 : Type u_1
E : Type u_2
F : Type ?u.24926
β : Type ?u.24929
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s : Set E
x✝ x y : E
ap bp : 𝕜
hap : 0 ≤ ap
hbp : 0 ≤ bp
habp : ap + bp = 1
aq bq : 𝕜
haq : 0 ≤ aq
hbq : 0 ≤ bq
habq : aq + bq = 1
a b : 𝕜
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ a • ap • x + b • aq • x + (a • bp • y + b • bq • y) = a • ap • x + a • bp • y + (b • aq • x + b • bq • y)
Theorem: QuadraticForm.not_anisotropic_iff_exists
File: Mathlib/LinearAlgebra/QuadraticForm/Basic.lean

tactic: simp only [Anisotropic, not_forall, exists_prop, and_comm]
state_before: S : Type ?u.477083
R : Type u_1
R₁ : Type ?u.477089
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
Q : QuadraticForm R M
⊢ ¬Anisotropic Q ↔ ∃ x, x ≠ 0 ∧ ↑Q x = 0
Theorem: exists_polynomial_near_continuousMap
File: Mathlib/Topology/ContinuousFunction/Weierstrass.lean

tactic: have w := mem_closure_iff_frequently.mp (continuousMap_mem_polynomialFunctions_closure _ _ f)
state_before: a b : ℝ
f : C(↑(Set.Icc a b), ℝ)
ε : ℝ
pos : 0 < ε
⊢ ∃ p, ‖Polynomial.toContinuousMapOn p (Set.Icc a b) - f‖ < ε

tactic: rw [Metric.nhds_basis_ball.frequently_iff] at w
state_before: a b : ℝ
f : C(↑(Set.Icc a b), ℝ)
ε : ℝ
pos : 0 < ε
w : ∃ᶠ (x : C(↑(Set.Icc a b), ℝ)) in nhds f, x ∈ ↑(polynomialFunctions (Set.Icc a b))
⊢ ∃ p, ‖Polynomial.toContinuousMapOn p (Set.Icc a b) - f‖ < ε

tactic: obtain ⟨-, H, ⟨m, ⟨-, rfl⟩⟩⟩ := w ε pos
state_before: a b : ℝ
f : C(↑(Set.Icc a b), ℝ)
ε : ℝ
pos : 0 < ε
w : ∀ (i : ℝ), 0 < i → ∃ x, x ∈ Metric.ball f i ∧ x ∈ ↑(polynomialFunctions (Set.Icc a b))
⊢ ∃ p, ‖Polynomial.toContinuousMapOn p (Set.Icc a b) - f‖ < ε

tactic: rw [Metric.mem_ball, dist_eq_norm] at H
state_before: case intro.intro.intro.intro
a b : ℝ
f : C(↑(Set.Icc a b), ℝ)
ε : ℝ
pos : 0 < ε
w : ∀ (i : ℝ), 0 < i → ∃ x, x ∈ Metric.ball f i ∧ x ∈ ↑(polynomialFunctions (Set.Icc a b))
m : ℝ[X]
H : ↑↑(Polynomial.toContinuousMapOnAlgHom (Set.Icc a b)) m ∈ Metric.ball f ε
⊢ ∃ p, ‖Polynomial.toContinuousMapOn p (Set.Icc a b) - f‖ < ε

tactic: exact ⟨m, H⟩
state_before: case intro.intro.intro.intro
a b : ℝ
f : C(↑(Set.Icc a b), ℝ)
ε : ℝ
pos : 0 < ε
w : ∀ (i : ℝ), 0 < i → ∃ x, x ∈ Metric.ball f i ∧ x ∈ ↑(polynomialFunctions (Set.Icc a b))
m : ℝ[X]
H : ‖↑↑(Polynomial.toContinuousMapOnAlgHom (Set.Icc a b)) m - f‖ < ε
⊢ ∃ p, ‖Polynomial.toContinuousMapOn p (Set.Icc a b) - f‖ < ε
Theorem: Real.Angle.angle_eq_iff_two_pi_dvd_sub
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: simp only [QuotientAddGroup.eq, AddSubgroup.zmultiples_eq_closure,
  AddSubgroup.mem_closure_singleton, zsmul_eq_mul', (sub_eq_neg_add _ _).symm, eq_comm]
state_before: ψ θ : ℝ
⊢ ↑θ = ↑ψ ↔ ∃ k, θ - ψ = 2 * π * ↑k

tactic: rw [Angle.coe, Angle.coe, QuotientAddGroup.eq]
state_before: ψ θ : ℝ
⊢ ↑ψ = ↑θ ↔ ∃ k, θ - ψ = 2 * π * ↑k

tactic: simp only [AddSubgroup.zmultiples_eq_closure,
  AddSubgroup.mem_closure_singleton, zsmul_eq_mul', (sub_eq_neg_add _ _).symm, eq_comm]
state_before: ψ θ : ℝ
⊢ -ψ + θ ∈ AddSubgroup.zmultiples (2 * π) ↔ ∃ k, θ - ψ = 2 * π * ↑k
Theorem: ContinuousLinearMap.exists_mul_lt_apply_of_lt_op_nnnorm
File: Mathlib/Analysis/NormedSpace/OperatorNorm.lean

tactic: simpa only [not_forall, not_le, Set.mem_setOf] using
  not_mem_of_lt_csInf (nnnorm_def f ▸ hr : r < sInf { c : ℝ≥0 | ∀ x, ‖f x‖₊ ≤ c * ‖x‖₊ })
    (OrderBot.bddBelow _)
state_before: 𝕜 : Type u_1
𝕜₂ : Type u_2
𝕜₃ : Type ?u.738492
E : Type u_3
Eₗ : Type ?u.738498
F : Type u_4
Fₗ : Type ?u.738504
G : Type ?u.738507
Gₗ : Type ?u.738510
𝓕 : Type ?u.738513
inst✝¹⁶ : SeminormedAddCommGroup E
inst✝¹⁵ : SeminormedAddCommGroup Eₗ
inst✝¹⁴ : SeminormedAddCommGroup F
inst✝¹³ : SeminormedAddCommGroup Fₗ
inst✝¹² : SeminormedAddCommGroup G
inst✝¹¹ : SeminormedAddCommGroup Gₗ
inst✝¹⁰ : NontriviallyNormedField 𝕜
inst✝⁹ : NontriviallyNormedField 𝕜₂
inst✝⁸ : NontriviallyNormedField 𝕜₃
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : NormedSpace 𝕜 Eₗ
inst✝⁵ : NormedSpace 𝕜₂ F
inst✝⁴ : NormedSpace 𝕜 Fₗ
inst✝³ : NormedSpace 𝕜₃ G
inst✝² : NormedSpace 𝕜 Gₗ
σ₁₂ : 𝕜 →+* 𝕜₂
σ₂₃ : 𝕜₂ →+* 𝕜₃
σ₁₃ : 𝕜 →+* 𝕜₃
inst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
inst✝ : RingHomIsometric σ₁₂
f : E →SL[σ₁₂] F
r : ℝ≥0
hr : r < ‖f‖₊
⊢ ∃ x, r * ‖x‖₊ < ‖↑f x‖₊
Theorem: IsSelfAdjoint.coe_selfAdjointPart_apply
File: Mathlib/Algebra/Star/Module.lean

tactic: rw [selfAdjointPart_apply_coe, hx.star_eq, smul_add, invOf_two_smul_add_invOf_two_smul]
state_before: R : Type u_2
A : Type u_1
inst✝⁷ : Semiring R
inst✝⁶ : StarSemigroup R
inst✝⁵ : TrivialStar R
inst✝⁴ : AddCommGroup A
inst✝³ : Module R A
inst✝² : StarAddMonoid A
inst✝¹ : StarModule R A
inst✝ : Invertible 2
x : A
hx : IsSelfAdjoint x
⊢ ↑(↑(selfAdjointPart R) x) = x
Theorem: List.get?_zero_scanl
File: Mathlib/Data/List/Basic.lean

tactic: cases l
state_before: ι : Type ?u.239850
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : β → α → β
b : β
a : α
l : List α
⊢ get? (scanl f b l) 0 = some b

tactic: simp only [get?, scanl_nil]
state_before: case nil
ι : Type ?u.239850
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : β → α → β
b : β
a : α
⊢ get? (scanl f b []) 0 = some b

tactic: simp only [get?, scanl_cons, singleton_append]
state_before: case cons
ι : Type ?u.239850
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : β → α → β
b : β
a head✝ : α
tail✝ : List α
⊢ get? (scanl f b (head✝ :: tail✝)) 0 = some b
Theorem: Function.IsFixedPt.apply
File: Mathlib/Dynamics/FixedPoints/Basic.lean

tactic: convert hx
state_before: α : Type u
β : Type v
f fa g : α → α
x✝ y : α
fb : β → β
m n k : ℕ
e : Perm α
x : α
hx : IsFixedPt f x
⊢ IsFixedPt f (f x)
Theorem: List.get_eq_get_rotate
File: Mathlib/Data/List/Rotate.lean

tactic: rw [get_rotate]
state_before: α : Type u
l : List α
n : ℕ
k : Fin (length l)
⊢ get l k =
    get (rotate l n)
      { val := (length l - n % length l + ↑k) % length l,
        isLt := (_ : (length l - n % length l + ↑k) % length l < length (rotate l n)) }

tactic: refine congr_arg l.get (Fin.eq_of_val_eq ?_)
state_before: α : Type u
l : List α
n : ℕ
k : Fin (length l)
⊢ get l k =
    get l
      {
        val :=
          (↑{ val := (length l - n % length l + ↑k) % length l,
                  isLt := (_ : (length l - n % length l + ↑k) % length l < length (rotate l n)) } +
              n) %
            length l,
        isLt :=
          (_ :
            (↑{ val := (length l - n % length l + ↑k) % length l,
                      isLt := (_ : (length l - n % length l + ↑k) % length l < length (rotate l n)) } +
                  n) %
                length l <
              length l) }

tactic: simp only [mod_add_mod]
state_before: α : Type u
l : List α
n : ℕ
k : Fin (length l)
⊢ ↑k =
    ↑{
        val :=
          (↑{ val := (length l - n % length l + ↑k) % length l,
                  isLt := (_ : (length l - n % length l + ↑k) % length l < length (rotate l n)) } +
              n) %
            length l,
        isLt :=
          (_ :
            (↑{ val := (length l - n % length l + ↑k) % length l,
                      isLt := (_ : (length l - n % length l + ↑k) % length l < length (rotate l n)) } +
                  n) %
                length l <
              length l) }

tactic: rw [← add_mod_mod, add_right_comm, tsub_add_cancel_of_le, add_mod_left, mod_eq_of_lt]
state_before: α : Type u
l : List α
n : ℕ
k : Fin (length l)
⊢ ↑k = (length l - n % length l + ↑k + n) % length l

tactic: exacts [k.2, (mod_lt _ (k.1.zero_le.trans_lt k.2)).le]
state_before: α : Type u
l : List α
n : ℕ
k : Fin (length l)
⊢ ↑k < length l

α : Type u
l : List α
n : ℕ
k : Fin (length l)
⊢ n % length l ≤ length l
Theorem: tendsto_div_nhds_one_iff
File: Mathlib/Topology/Algebra/Group/Basic.lean

tactic: simpa using h.mul A
state_before: α✝ : Type u
β : Type v
G : Type w
H : Type x
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
α : Type u_1
l : Filter α
x : G
u : α → G
A : Tendsto (fun x_1 => x) l (𝓝 x)
h : Tendsto (fun n => u n / x) l (𝓝 1)
⊢ Tendsto u l (𝓝 x)

tactic: simpa using h.div' A
state_before: α✝ : Type u
β : Type v
G : Type w
H : Type x
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
α : Type u_1
l : Filter α
x : G
u : α → G
A : Tendsto (fun x_1 => x) l (𝓝 x)
h : Tendsto u l (𝓝 x)
⊢ Tendsto (fun n => u n / x) l (𝓝 1)
Theorem: a_is_soln
File: Mathlib/NumberTheory/Padics/Hensel.lean

tactic: simp [deriv_ne_zero hnorm]
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
F : Polynomial ℤ_[p]
a : ℤ_[p]
hnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2
ha : Polynomial.eval a F = 0
⊢ ‖a - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖
Theorem: Matrix.cons_vecMul
File: Mathlib/Data/Matrix/Notation.lean

tactic: ext i
state_before: α : Type u
o n m : ℕ
m' : Type uₘ
n' : Type uₙ
o' : Type uₒ
a b : ℕ
inst✝ : Semiring α
x : α
v : Fin n → α
B : Fin (Nat.succ n) → o' → α
⊢ vecMul (vecCons x v) (↑of B) = x • vecHead B + vecMul v (↑of (vecTail B))

tactic: simp [vecMul]
state_before: case h
α : Type u
o n m : ℕ
m' : Type uₘ
n' : Type uₙ
o' : Type uₒ
a b : ℕ
inst✝ : Semiring α
x : α
v : Fin n → α
B : Fin (Nat.succ n) → o' → α
i : o'
⊢ vecMul (vecCons x v) (↑of B) i = (x • vecHead B + vecMul v (↑of (vecTail B))) i
Theorem: Order.succ_le_succ_iff
File: Mathlib/Order/SuccPred/Basic.lean

tactic: simp
state_before: α : Type u_1
inst✝² : Preorder α
inst✝¹ : SuccOrder α
a b : α
inst✝ : NoMaxOrder α
⊢ succ a ≤ succ b ↔ a ≤ b
Theorem: CategoryTheory.transferNatTransSelf_adjunction_id_symm
File: Mathlib/CategoryTheory/Adjunction/Mates.lean

tactic: dsimp [transferNatTransSelf, transferNatTrans, Adjunction.id]
state_before: C : Type u₁
D : Type u₂
inst✝¹ : Category C
inst✝ : Category D
L₁ L₂ L₃ : C ⥤ D
R₁ R₂ R₃ : D ⥤ C
adj₁ : L₁ ⊣ R₁
adj₂ : L₂ ⊣ R₂
adj₃ : L₃ ⊣ R₃
L R : C ⥤ C
adj : L ⊣ R
g : R ⟶ 𝟭 C
X : C
⊢ (↑(transferNatTransSelf adj Adjunction.id).symm g).app X = adj.unit.app X ≫ g.app (L.obj X)

tactic: simp only [comp_id, id_comp]
state_before: C : Type u₁
D : Type u₂
inst✝¹ : Category C
inst✝ : Category D
L₁ L₂ L₃ : C ⥤ D
R₁ R₂ R₃ : D ⥤ C
adj₁ : L₁ ⊣ R₁
adj₂ : L₂ ⊣ R₂
adj₃ : L₃ ⊣ R₃
L R : C ⥤ C
adj : L ⊣ R
g : R ⟶ 𝟭 C
X : C
⊢ 𝟙 X ≫ ((adj.unit.app X ≫ 𝟙 (R.obj (L.obj X)) ≫ g.app (L.obj X) ≫ 𝟙 (L.obj X)) ≫ 𝟙 (L.obj X)) ≫ 𝟙 (L.obj X) =
    adj.unit.app X ≫ g.app (L.obj X)
Theorem: Filter.not_eventually
File: Mathlib/Order/Filter/Basic.lean

tactic: simp [Filter.Frequently]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.161458
ι : Sort x
p : α → Prop
f : Filter α
⊢ (¬∀ᶠ (x : α) in f, p x) ↔ ∃ᶠ (x : α) in f, ¬p x
Theorem: wittPolynomial_one
File: Mathlib/RingTheory/WittVector/WittPolynomial.lean

tactic: simp only [wittPolynomial_eq_sum_c_mul_x_pow, sum_range_succ_comm, range_one, sum_singleton,
  one_mul, pow_one, C_1, pow_zero, tsub_self, tsub_zero]
state_before: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
S : Type ?u.105241
inst✝ : CommRing S
⊢ W_ R 1 = ↑C ↑p * X 1 + X 0 ^ p
Theorem: differentiable_add_const_iff
File: Mathlib/Analysis/Calculus/FDeriv/Add.lean

tactic: simpa using h.add_const (-c)
state_before: 𝕜 : Type u_1
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type ?u.222279
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type ?u.222374
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
c : F
h : Differentiable 𝕜 fun y => f y + c
⊢ Differentiable 𝕜 f
Theorem: CategoryTheory.InjectiveResolution.descFOne_zero_comm
File: Mathlib/CategoryTheory/Abelian/InjectiveResolution.lean

tactic: simp [descFZero, descFOne]
state_before: C : Type u
inst✝¹ : Category C
inst✝ : Abelian C
Y Z : C
f : Z ⟶ Y
I : InjectiveResolution Y
J : InjectiveResolution Z
⊢ HomologicalComplex.d J.cocomplex 0 1 ≫ descFOne f I J = descFZero f I J ≫ HomologicalComplex.d I.cocomplex 0 1