tasksource/leandojo huggingface dataset:
Theorem: Polynomial.card_roots'
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: by_cases hp0 : p = 0
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
⊢ ↑Multiset.card (roots p) ≤ natDegree p

tactic: exact WithBot.coe_le_coe.1 (le_trans (card_roots hp0) (le_of_eq <| degree_eq_natDegree hp0))
state_before: case neg
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
hp0 : ¬p = 0
⊢ ↑Multiset.card (roots p) ≤ natDegree p

tactic: simp [hp0]
state_before: case pos
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
hp0 : p = 0
⊢ ↑Multiset.card (roots p) ≤ natDegree p
Theorem: List.sum_take_map_length_lt1
File: Mathlib/Data/List/Join.lean

tactic: simp [hi, sum_take_succ, hj]
state_before: α : Type u_1
β : Type ?u.12788
L : List (List α)
i j : ℕ
hi : i < length L
hj : j < length (nthLe L i hi)
⊢ sum (take i (map length L)) + j < sum (take (i + 1) (map length L))
Theorem: LinearMap.equivariantProjection_apply
File: Mathlib/RepresentationTheory/Maschke.lean

tactic: simp only [equivariantProjection, smul_apply, sumOfConjugatesEquivariant_apply]
state_before: k : Type u
inst✝¹¹ : CommRing k
G : Type u
inst✝¹⁰ : Group G
V : Type v
inst✝⁹ : AddCommGroup V
inst✝⁸ : Module k V
inst✝⁷ : Module (MonoidAlgebra k G) V
inst✝⁶ : IsScalarTower k (MonoidAlgebra k G) V
W : Type w
inst✝⁵ : AddCommGroup W
inst✝⁴ : Module k W
inst✝³ : Module (MonoidAlgebra k G) W
inst✝² : IsScalarTower k (MonoidAlgebra k G) W
π : W →ₗ[k] V
i : V →ₗ[MonoidAlgebra k G] W
h : ∀ (v : V), ↑π (↑i v) = v
inst✝¹ : Fintype G
inst✝ : Invertible ↑(Fintype.card G)
v : W
⊢ ↑(equivariantProjection G π) v = ⅟↑(Fintype.card G) • ∑ g : G, ↑(conjugate π g) v
Theorem: MeasureTheory.tendsto_Lp_of_tendstoInMeasure
File: Mathlib/MeasureTheory/Function/UniformIntegrable.lean

tactic: refine' tendsto_of_subseq_tendsto fun ns hns => _
state_before: α : Type u_1
β : Type u_2
ι : Type ?u.504674
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup β
p : ℝ≥0∞
f : ℕ → α → β
g : α → β
inst✝ : IsFiniteMeasure μ
hp : 1 ≤ p
hp' : p ≠ ⊤
hf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ
hg : Memℒp g p
hui : UnifIntegrable f p μ
hfg : TendstoInMeasure μ f atTop g
⊢ Tendsto (fun n => snorm (f n - g) p μ) atTop (𝓝 0)

tactic: obtain ⟨ms, _, hms'⟩ := TendstoInMeasure.exists_seq_tendsto_ae fun ε hε => (hfg ε hε).comp hns
state_before: α : Type u_1
β : Type u_2
ι : Type ?u.504674
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup β
p : ℝ≥0∞
f : ℕ → α → β
g : α → β
inst✝ : IsFiniteMeasure μ
hp : 1 ≤ p
hp' : p ≠ ⊤
hf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ
hg : Memℒp g p
hui : UnifIntegrable f p μ
hfg : TendstoInMeasure μ f atTop g
ns : ℕ → ℕ
hns : Tendsto ns atTop atTop
⊢ ∃ ms, Tendsto (fun n => snorm (f (ns (ms n)) - g) p μ) atTop (𝓝 0)

tactic: exact ⟨ms,
  tendsto_Lp_of_tendsto_ae μ hp hp' (fun _ => hf _) hg (fun ε hε =>
    let ⟨δ, hδ, hδ'⟩ := hui hε
    ⟨δ, hδ, fun i s hs hμs => hδ' _ s hs hμs⟩)
    hms'⟩
state_before: case intro.intro
α : Type u_1
β : Type u_2
ι : Type ?u.504674
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup β
p : ℝ≥0∞
f : ℕ → α → β
g : α → β
inst✝ : IsFiniteMeasure μ
hp : 1 ≤ p
hp' : p ≠ ⊤
hf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ
hg : Memℒp g p
hui : UnifIntegrable f p μ
hfg : TendstoInMeasure μ f atTop g
ns : ℕ → ℕ
hns : Tendsto ns atTop atTop
ms : ℕ → ℕ
left✝ : StrictMono ms
hms' : ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns (ms i)) x) atTop (𝓝 (g x))
⊢ ∃ ms, Tendsto (fun n => snorm (f (ns (ms n)) - g) p μ) atTop (𝓝 0)
Theorem: norm_fderiv_iteratedFDeriv
File: Mathlib/Analysis/Calculus/ContDiffDef.lean

tactic: rw [iteratedFDeriv_succ_eq_comp_left, comp_apply, LinearIsometryEquiv.norm_map]
state_before: 𝕜 : Type u
inst✝⁸ : NontriviallyNormedField 𝕜
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 uX
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f f₁ : E → F
g : F → G
x x₀ : E
c : F
m n✝ : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
n : ℕ
⊢ ‖fderiv 𝕜 (iteratedFDeriv 𝕜 n f) x‖ = ‖iteratedFDeriv 𝕜 (n + 1) f x‖
Theorem: CompleteLattice.independent_of_dfinsupp_sumAddHom_injective'
File: Mathlib/LinearAlgebra/Dfinsupp.lean

tactic: rw [← independent_map_orderIso_iff (AddSubgroup.toIntSubmodule : AddSubgroup N ≃o _)]
state_before: ι : Type u_2
R : Type ?u.632921
S : Type ?u.632924
M : ι → Type ?u.632929
N : Type u_1
dec_ι : DecidableEq ι
inst✝² : Ring R
inst✝¹ : AddCommGroup N
inst✝ : Module R N
p : ι → AddSubgroup N
h : Function.Injective ↑(sumAddHom fun i => AddSubgroup.subtype (p i))
⊢ Independent p

tactic: exact independent_of_dfinsupp_lsum_injective _ h
state_before: ι : Type u_2
R : Type ?u.632921
S : Type ?u.632924
M : ι → Type ?u.632929
N : Type u_1
dec_ι : DecidableEq ι
inst✝² : Ring R
inst✝¹ : AddCommGroup N
inst✝ : Module R N
p : ι → AddSubgroup N
h : Function.Injective ↑(sumAddHom fun i => AddSubgroup.subtype (p i))
⊢ Independent (↑AddSubgroup.toIntSubmodule ∘ p)
Theorem: Nat.pair_unpair
File: Mathlib/Data/Nat/Pairing.lean

tactic: dsimp only [unpair]
state_before: n : ℕ
⊢ pair (unpair n).fst (unpair n).snd = n

tactic: let s := sqrt n
state_before: n : ℕ
⊢ pair
      (if n - sqrt n * sqrt n < sqrt n then (n - sqrt n * sqrt n, sqrt n)
        else (sqrt n, n - sqrt n * sqrt n - sqrt n)).fst
      (if n - sqrt n * sqrt n < sqrt n then (n - sqrt n * sqrt n, sqrt n)
        else (sqrt n, n - sqrt n * sqrt n - sqrt n)).snd =
    n

tactic: have sm : s * s + (n - s * s) = n := add_tsub_cancel_of_le (sqrt_le _)
state_before: n : ℕ
s : ℕ := sqrt n
⊢ pair
      (if n - sqrt n * sqrt n < sqrt n then (n - sqrt n * sqrt n, sqrt n)
        else (sqrt n, n - sqrt n * sqrt n - sqrt n)).fst
      (if n - sqrt n * sqrt n < sqrt n then (n - sqrt n * sqrt n, sqrt n)
        else (sqrt n, n - sqrt n * sqrt n - sqrt n)).snd =
    n

tactic: split_ifs with h
state_before: n : ℕ
s : ℕ := sqrt n
sm : s * s + (n - s * s) = n
⊢ pair
      (if n - sqrt n * sqrt n < sqrt n then (n - sqrt n * sqrt n, sqrt n)
        else (sqrt n, n - sqrt n * sqrt n - sqrt n)).fst
      (if n - sqrt n * sqrt n < sqrt n then (n - sqrt n * sqrt n, sqrt n)
        else (sqrt n, n - sqrt n * sqrt n - sqrt n)).snd =
    n

tactic: simp [pair, h, sm]
state_before: case inl
n : ℕ
s : ℕ := sqrt n
sm : s * s + (n - s * s) = n
h : n - sqrt n * sqrt n < sqrt n
⊢ pair (n - sqrt n * sqrt n, sqrt n).fst (n - sqrt n * sqrt n, sqrt n).snd = n

tactic: have hl : n - s * s - s ≤ s :=
  tsub_le_iff_left.mpr (tsub_le_iff_left.mpr <| by rw [← add_assoc] ; apply sqrt_le_add)
state_before: case inr
n : ℕ
s : ℕ := sqrt n
sm : s * s + (n - s * s) = n
h : ¬n - sqrt n * sqrt n < sqrt n
⊢ pair (sqrt n, n - sqrt n * sqrt n - sqrt n).fst (sqrt n, n - sqrt n * sqrt n - sqrt n).snd = n

tactic: simp [pair, hl.not_lt, add_assoc, add_tsub_cancel_of_le (le_of_not_gt h), sm]
state_before: case inr
n : ℕ
s : ℕ := sqrt n
sm : s * s + (n - s * s) = n
h : ¬n - sqrt n * sqrt n < sqrt n
hl : n - s * s - s ≤ s
⊢ pair (sqrt n, n - sqrt n * sqrt n - sqrt n).fst (sqrt n, n - sqrt n * sqrt n - sqrt n).snd = n

tactic: rw [← add_assoc]
state_before: n : ℕ
s : ℕ := sqrt n
sm : s * s + (n - s * s) = n
h : ¬n - sqrt n * sqrt n < sqrt n
⊢ n ≤ s * s + (s + s)

tactic: apply sqrt_le_add
state_before: n : ℕ
s : ℕ := sqrt n
sm : s * s + (n - s * s) = n
h : ¬n - sqrt n * sqrt n < sqrt n
⊢ n ≤ s * s + s + s
Theorem: PFunctor.Approx.agree_children
File: Mathlib/Data/PFunctor/Univariate/M.lean

tactic: cases' h₁ with _ _ _ _ _ _ hagree
state_before: F : PFunctor
n : ℕ
x : CofixA F (succ n)
y : CofixA F (succ n + 1)
i : B F (head' x)
j : B F (head' y)
h₀ : HEq i j
h₁ : Agree x y
⊢ Agree (children' x i) (children' y j)

tactic: cases h₀
state_before: case intro
F : PFunctor
n : ℕ
a✝ : F.A
x✝ : B F a✝ → CofixA F n
x'✝ : B F a✝ → CofixA F (n + 1)
hagree : ∀ (i : B F a✝), Agree (x✝ i) (x'✝ i)
i : B F (head' (CofixA.intro a✝ x✝))
j : B F (head' (CofixA.intro a✝ x'✝))
h₀ : HEq i j
⊢ Agree (children' (CofixA.intro a✝ x✝) i) (children' (CofixA.intro a✝ x'✝) j)

tactic: apply hagree
state_before: case intro.refl
F : PFunctor
n : ℕ
a✝ : F.A
x✝ : B F a✝ → CofixA F n
x'✝ : B F a✝ → CofixA F (n + 1)
hagree : ∀ (i : B F a✝), Agree (x✝ i) (x'✝ i)
i : B F (head' (CofixA.intro a✝ x✝))
⊢ Agree (children' (CofixA.intro a✝ x✝) i) (children' (CofixA.intro a✝ x'✝) i)
Theorem: MeasureTheory.AEEqFun.mk_coeFn
File: Mathlib/MeasureTheory/Function/AEEqFun.lean

tactic: conv_rhs => rw [← Quotient.out_eq' f]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.308002
δ : Type ?u.308005
inst✝³ : MeasurableSpace α
μ ν : Measure α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
f : α →ₘ[μ] β
⊢ mk ↑f (_ : AEStronglyMeasurable (↑f) μ) = f

tactic: set g : { f : α → β // AEStronglyMeasurable f μ } := Quotient.out' f
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.308002
δ : Type ?u.308005
inst✝³ : MeasurableSpace α
μ ν : Measure α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
f : α →ₘ[μ] β
⊢ mk ↑f (_ : AEStronglyMeasurable (↑f) μ) = Quotient.mk'' (Quotient.out' f)

tactic: have : g = ⟨g.1, g.2⟩ := Subtype.eq rfl
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.308002
δ : Type ?u.308005
inst✝³ : MeasurableSpace α
μ ν : Measure α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
f : α →ₘ[μ] β
g : { f // AEStronglyMeasurable f μ } := Quotient.out' f
⊢ mk ↑f (_ : AEStronglyMeasurable (↑f) μ) = Quotient.mk'' g

tactic: rw [this, ← mk, mk_eq_mk]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.308002
δ : Type ?u.308005
inst✝³ : MeasurableSpace α
μ ν : Measure α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
f : α →ₘ[μ] β
g : { f // AEStronglyMeasurable f μ } := Quotient.out' f
this : g = { val := ↑g, property := (_ : AEStronglyMeasurable (↑g) μ) }
⊢ mk ↑f (_ : AEStronglyMeasurable (↑f) μ) = Quotient.mk'' g

tactic: exact (AEStronglyMeasurable.ae_eq_mk _).symm
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.308002
δ : Type ?u.308005
inst✝³ : MeasurableSpace α
μ ν : Measure α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
f : α →ₘ[μ] β
g : { f // AEStronglyMeasurable f μ } := Quotient.out' f
this : g = { val := ↑g, property := (_ : AEStronglyMeasurable (↑g) μ) }
⊢ ↑f =ᵐ[μ] ↑g
Theorem: Finset.val_toFinset
File: Mathlib/Data/Finset/Basic.lean

tactic: ext
state_before: α : Type u_1
β : Type ?u.455035
γ : Type ?u.455038
inst✝ : DecidableEq α
s : Finset α
⊢ toFinset s.val = s

tactic: rw [Multiset.mem_toFinset, ← mem_def]
state_before: case a
α : Type u_1
β : Type ?u.455035
γ : Type ?u.455038
inst✝ : DecidableEq α
s : Finset α
a✝ : α
⊢ a✝ ∈ toFinset s.val ↔ a✝ ∈ s
Theorem: Nat.choose_eq_asc_factorial_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) k = ascFactorial n k / k !

tactic: rw [← ascFactorial_eq_factorial_mul_choose]
state_before: n k : ℕ
⊢ k ! * choose (n + k) k = k ! * (ascFactorial n k / k !)

tactic: exact (Nat.mul_div_cancel' <| factorial_dvd_ascFactorial _ _).symm
state_before: n k : ℕ
⊢ ascFactorial n k = k ! * (ascFactorial n k / k !)
Theorem: tendsto_one_div_add_atTop_nhds_0_nat
File: Mathlib/Analysis/SpecificLimits/Basic.lean

tactic: simpa
state_before: α : Type ?u.3724
β : Type ?u.3727
ι : Type ?u.3730
this : Tendsto (fun n => 1 / ↑(n + 1)) atTop (𝓝 0)
⊢ Tendsto (fun n => 1 / (↑n + 1)) atTop (𝓝 0)
Theorem: le_of_nhds_le_nhds
File: Mathlib/Topology/Order.lean

tactic: rw [@isOpen_iff_mem_nhds _ t₁, @isOpen_iff_mem_nhds α t₂]
state_before: α : Type u_1
t t₁ t₂ : TopologicalSpace α
s✝ : Set α
h : ∀ (x : α), 𝓝 x ≤ 𝓝 x
s : Set α
⊢ IsOpen s → IsOpen s

tactic: exact fun hs a ha => h _ (hs _ ha)
state_before: α : Type u_1
t t₁ t₂ : TopologicalSpace α
s✝ : Set α
h : ∀ (x : α), 𝓝 x ≤ 𝓝 x
s : Set α
⊢ (∀ (a : α), a ∈ s → s ∈ 𝓝 a) → ∀ (a : α), a ∈ s → s ∈ 𝓝 a
Theorem: Set.Ioi_union_left
File: Mathlib/Data/Set/Intervals/Basic.lean

tactic: simp [eq_comm, le_iff_eq_or_lt]
state_before: α : Type u_1
β : Type ?u.45790
inst✝ : PartialOrder α
a b c x : α
⊢ x ∈ Ioi a ∪ {a} ↔ x ∈ Ici a
Theorem: NFA.pumping_lemma
File: Mathlib/Computability/NFA.lean

tactic: rw [← toDFA_correct] at hx ⊢
state_before: α : Type u
σ σ' : Type v
M : NFA α σ
inst✝ : Fintype σ
x : List α
hx : x ∈ accepts M
hlen : Fintype.card (Set σ) ≤ List.length x
⊢ ∃ a b c,
    x = a ++ b ++ c ∧ List.length a + List.length b ≤ Fintype.card (Set σ) ∧ b ≠ [] ∧ {a} * {b}∗ * {c} ≤ accepts M

tactic: exact M.toDFA.pumping_lemma hx hlen
state_before: α : Type u
σ σ' : Type v
M : NFA α σ
inst✝ : Fintype σ
x : List α
hx : x ∈ DFA.accepts (toDFA M)
hlen : Fintype.card (Set σ) ≤ List.length x
⊢ ∃ a b c,
    x = a ++ b ++ c ∧
      List.length a + List.length b ≤ Fintype.card (Set σ) ∧ b ≠ [] ∧ {a} * {b}∗ * {c} ≤ DFA.accepts (toDFA M)
Theorem: Cardinal.zero_le
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: rintro ⟨α⟩
state_before: α β : Type u
⊢ ∀ (a : Cardinal), 0 ≤ a

tactic: exact ⟨Embedding.ofIsEmpty⟩
state_before: case mk
α✝ β : Type u
a✝ : Cardinal
α : Type u_1
⊢ 0 ≤ Quot.mk Setoid.r α
Theorem: Stream'.tail_interleave
File: Mathlib/Data/Stream/Init.lean

tactic: unfold interleave corecOn
state_before: α : Type u
β : Type v
δ : Type w
s₁ s₂ : Stream' α
⊢ tail (s₁ ⋈ s₂) = s₂ ⋈ tail s₁

tactic: rw [corec_eq]
state_before: α : Type u
β : Type v
δ : Type w
s₁ s₂ : Stream' α
⊢ tail
      (corec
        (fun x =>
          match x with
          | (s₁, snd) => head s₁)
        (fun x =>
          match x with
          | (s₁, s₂) => (s₂, tail s₁))
        (s₁, s₂)) =
    corec
      (fun x =>
        match x with
        | (s₁, snd) => head s₁)
      (fun x =>
        match x with
        | (s₁, s₂) => (s₂, tail s₁))
      (s₂, tail s₁)

tactic: rfl
state_before: α : Type u
β : Type v
δ : Type w
s₁ s₂ : Stream' α
⊢ tail
      ((match (s₁, s₂) with
        | (s₁, snd) => head s₁) ::
        corec
          (fun x =>
            match x with
            | (s₁, snd) => head s₁)
          (fun x =>
            match x with
            | (s₁, s₂) => (s₂, tail s₁))
          (match (s₁, s₂) with
          | (s₁, s₂) => (s₂, tail s₁))) =
    corec
      (fun x =>
        match x with
        | (s₁, snd) => head s₁)
      (fun x =>
        match x with
        | (s₁, s₂) => (s₂, tail s₁))
      (s₂, tail s₁)
Theorem: Complex.conj_neg_I
File: Mathlib/Data/Complex/Basic.lean

tactic: simp
state_before: ⊢ (↑(starRingEnd ℂ) (-I)).re = I.re ∧ (↑(starRingEnd ℂ) (-I)).im = I.im
Theorem: Equiv.extendSubtype_mem
File: Mathlib/Logic/Equiv/Fintype.lean

tactic: convert (e ⟨x, hx⟩).2
state_before: α : Type u_1
β : Type ?u.153621
inst✝³ : Fintype α
inst✝² : DecidableEq β
e✝ : Perm α
f : α ↪ β
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
e : { x // p x } ≃ { x // q x }
x : α
hx : p x
⊢ q (↑(extendSubtype e) x)

tactic: rw [e.extendSubtype_apply_of_mem _ hx]
state_before: case h.e'_1
α : Type u_1
β : Type ?u.153621
inst✝³ : Fintype α
inst✝² : DecidableEq β
e✝ : Perm α
f : α ↪ β
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
e : { x // p x } ≃ { x // q x }
x : α
hx : p x
⊢ ↑(extendSubtype e) x = ↑(↑e { val := x, property := hx })
Theorem: List.zipWith_congr
File: Mathlib/Data/List/Zip.lean

tactic: induction' h with a b as bs hfg _ ih
state_before: α : Type u
β : Type u_1
γ : Type u_2
δ : Type ?u.89176
ε : Type ?u.89179
f g : α → β → γ
la : List α
lb : List β
h : Forall₂ (fun a b => f a b = g a b) la lb
⊢ zipWith f la lb = zipWith g la lb

tactic: rfl
state_before: case nil
α : Type u
β : Type u_1
γ : Type u_2
δ : Type ?u.89176
ε : Type ?u.89179
f g : α → β → γ
la : List α
lb : List β
⊢ zipWith f [] [] = zipWith g [] []

tactic: exact congr_arg₂ _ hfg ih
state_before: case cons
α : Type u
β : Type u_1
γ : Type u_2
δ : Type ?u.89176
ε : Type ?u.89179
f g : α → β → γ
la : List α
lb : List β
a : α
b : β
as : List α
bs : List β
hfg : f a b = g a b
a✝ : Forall₂ (fun a b => f a b = g a b) as bs
ih : zipWith f as bs = zipWith g as bs
⊢ zipWith f (a :: as) (b :: bs) = zipWith g (a :: as) (b :: bs)
Theorem: vsub_vadd_eq_vsub_sub
File: Mathlib/Algebra/AddTorsor.lean

tactic: rw [← add_right_inj (p2 -ᵥ p1 : G), vsub_add_vsub_cancel, ← neg_vsub_eq_vsub_rev, vadd_vsub, ←
  add_sub_assoc, ← neg_vsub_eq_vsub_rev, neg_add_self, zero_sub]
state_before: G : Type u_1
P : Type u_2
inst✝ : AddGroup G
T : AddTorsor G P
p1 p2 : P
g : G
⊢ p1 -ᵥ (g +ᵥ p2) = p1 -ᵥ p2 - g
Theorem: Polynomial.trailingDegree_eq_iff_natTrailingDegree_eq
File: Mathlib/Data/Polynomial/Degree/TrailingDegree.lean

tactic: rw [trailingDegree_eq_natTrailingDegree hp]
state_before: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
n : ℕ
hp : p ≠ 0
⊢ trailingDegree p = ↑n ↔ natTrailingDegree p = n

tactic: exact WithTop.coe_eq_coe
state_before: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
n : ℕ
hp : p ≠ 0
⊢ ↑(natTrailingDegree p) = ↑n ↔ natTrailingDegree p = n
Theorem: ZNum.zneg_pred
File: Mathlib/Data/Num/Lemmas.lean

tactic: rw [← zneg_zneg (succ (-n)), zneg_succ, zneg_zneg]
state_before: α : Type ?u.658993
n : ZNum
⊢ -pred n = succ (-n)
Theorem: Nat.coprime_mul_iff_left
File: Std/Data/Nat/Gcd.lean

tactic: rwa [coprime_iff_gcd_eq_one, h.gcd_mul_left_cancel n]
state_before: m n k : Nat
x✝ : coprime m k ∧ coprime n k
h : coprime m k
right✝ : coprime n k
⊢ coprime (m * n) k
Theorem: AffineMap.continuous_iff
File: Mathlib/Topology/Algebra/Affine.lean

tactic: constructor
state_before: R : Type u_1
E : Type u_2
F : Type u_3
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : AddCommGroup F
inst✝⁴ : TopologicalSpace F
inst✝³ : TopologicalAddGroup F
inst✝² : Ring R
inst✝¹ : Module R E
inst✝ : Module R F
f : E →ᵃ[R] F
⊢ Continuous ↑f ↔ Continuous ↑f.linear

tactic: intro hc
state_before: case mp
R : Type u_1
E : Type u_2
F : Type u_3
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : AddCommGroup F
inst✝⁴ : TopologicalSpace F
inst✝³ : TopologicalAddGroup F
inst✝² : Ring R
inst✝¹ : Module R E
inst✝ : Module R F
f : E →ᵃ[R] F
⊢ Continuous ↑f → Continuous ↑f.linear

tactic: rw [decomp' f]
state_before: case mp
R : Type u_1
E : Type u_2
F : Type u_3
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : AddCommGroup F
inst✝⁴ : TopologicalSpace F
inst✝³ : TopologicalAddGroup F
inst✝² : Ring R
inst✝¹ : Module R E
inst✝ : Module R F
f : E →ᵃ[R] F
hc : Continuous ↑f
⊢ Continuous ↑f.linear

tactic: exact hc.sub continuous_const
state_before: case mp
R : Type u_1
E : Type u_2
F : Type u_3
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : AddCommGroup F
inst✝⁴ : TopologicalSpace F
inst✝³ : TopologicalAddGroup F
inst✝² : Ring R
inst✝¹ : Module R E
inst✝ : Module R F
f : E →ᵃ[R] F
hc : Continuous ↑f
⊢ Continuous (↑f - fun x => ↑f 0)

tactic: intro hc
state_before: case mpr
R : Type u_1
E : Type u_2
F : Type u_3
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : AddCommGroup F
inst✝⁴ : TopologicalSpace F
inst✝³ : TopologicalAddGroup F
inst✝² : Ring R
inst✝¹ : Module R E
inst✝ : Module R F
f : E →ᵃ[R] F
⊢ Continuous ↑f.linear → Continuous ↑f

tactic: rw [decomp f]
state_before: case mpr
R : Type u_1
E : Type u_2
F : Type u_3
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : AddCommGroup F
inst✝⁴ : TopologicalSpace F
inst✝³ : TopologicalAddGroup F
inst✝² : Ring R
inst✝¹ : Module R E
inst✝ : Module R F
f : E →ᵃ[R] F
hc : Continuous ↑f.linear
⊢ Continuous ↑f

tactic: exact hc.add continuous_const
state_before: case mpr
R : Type u_1
E : Type u_2
F : Type u_3
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : AddCommGroup F
inst✝⁴ : TopologicalSpace F
inst✝³ : TopologicalAddGroup F
inst✝² : Ring R
inst✝¹ : Module R E
inst✝ : Module R F
f : E →ᵃ[R] F
hc : Continuous ↑f.linear
⊢ Continuous (↑f.linear + fun x => ↑f 0)
Theorem: neg_concaveOn_iff
File: Mathlib/Analysis/Convex/Function.lean

tactic: rw [← neg_convexOn_iff, neg_neg f]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.650858
α : Type ?u.650861
β : Type u_3
ι : Type ?u.650867
inst✝⁵ : OrderedSemiring 𝕜
inst✝⁴ : AddCommMonoid E
inst✝³ : AddCommMonoid F
inst✝² : OrderedAddCommGroup β
inst✝¹ : SMul 𝕜 E
inst✝ : Module 𝕜 β
s : Set E
f g : E → β
⊢ ConcaveOn 𝕜 s (-f) ↔ ConvexOn 𝕜 s f
Theorem: Trivialization.preimageSingletonHomeomorph_symm_apply
File: Mathlib/Topology/FiberBundle/Trivialization.lean

tactic: rw [mem_preimage, e.proj_symm_apply' hb, mem_singleton_iff]
state_before: ι : Type ?u.38955
B : Type ?u.38958
F : Type ?u.38961
E : B → Type ?u.38966
Z : Type ?u.38969
inst✝³ : TopologicalSpace B
inst✝² : TopologicalSpace F
proj : Z → B
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace (TotalSpace E)
e : Trivialization F proj
x : Z
b : B
hb : b ∈ e.baseSet
p : F
⊢ ↑(LocalHomeomorph.symm e.toLocalHomeomorph) (b, p) ∈ proj ⁻¹' {b}
Theorem: Polynomial.eraseLead_C_mul_X_pow
File: Mathlib/Data/Polynomial/EraseLead.lean

tactic: rw [C_mul_X_pow_eq_monomial, eraseLead_monomial]
state_before: R : Type u_1
inst✝ : Semiring R
f : R[X]
r : R
n : ℕ
⊢ eraseLead (↑C r * X ^ n) = 0
Theorem: connectedComponents_preimage_image
File: Mathlib/Topology/Connected.lean

tactic: simp only [connectedComponents_preimage_singleton, preimage_iUnion₂, image_eq_iUnion]
state_before: α : Type u
β : Type v
ι : Type ?u.143197
π : ι → Type ?u.143202
inst✝² : TopologicalSpace α
s t u v : Set α
inst✝¹ : TopologicalSpace β
inst✝ : TotallyDisconnectedSpace β
f : α → β
U : Set α
⊢ ConnectedComponents.mk ⁻¹' (ConnectedComponents.mk '' U) = ⋃ (x : α) (_ : x ∈ U), connectedComponent x
Theorem: CategoryTheory.GrothendieckTopology.toPlus_plusLift
File: Mathlib/CategoryTheory/Sites/Plus.lean

tactic: dsimp [plusLift]
state_before: C : Type u
inst✝³ : Category C
J : GrothendieckTopology C
D : Type w
inst✝² : Category D
inst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
P✝ : Cᵒᵖ ⥤ D
inst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
P Q : Cᵒᵖ ⥤ D
η : P ⟶ Q
hQ : Presheaf.IsSheaf J Q
⊢ toPlus J P ≫ plusLift J η hQ = η

tactic: rw [← Category.assoc]
state_before: C : Type u
inst✝³ : Category C
J : GrothendieckTopology C
D : Type w
inst✝² : Category D
inst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
P✝ : Cᵒᵖ ⥤ D
inst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
P Q : Cᵒᵖ ⥤ D
η : P ⟶ Q
hQ : Presheaf.IsSheaf J Q
⊢ toPlus J P ≫ plusMap J η ≫ (isoToPlus J Q hQ).inv = η

tactic: rw [Iso.comp_inv_eq]
state_before: C : Type u
inst✝³ : Category C
J : GrothendieckTopology C
D : Type w
inst✝² : Category D
inst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
P✝ : Cᵒᵖ ⥤ D
inst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
P Q : Cᵒᵖ ⥤ D
η : P ⟶ Q
hQ : Presheaf.IsSheaf J Q
⊢ (toPlus J P ≫ plusMap J η) ≫ (isoToPlus J Q hQ).inv = η

tactic: dsimp only [isoToPlus, asIso]
state_before: C : Type u
inst✝³ : Category C
J : GrothendieckTopology C
D : Type w
inst✝² : Category D
inst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
P✝ : Cᵒᵖ ⥤ D
inst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
P Q : Cᵒᵖ ⥤ D
η : P ⟶ Q
hQ : Presheaf.IsSheaf J Q
⊢ toPlus J P ≫ plusMap J η = η ≫ (isoToPlus J Q hQ).hom

tactic: rw [toPlus_naturality]
state_before: C : Type u
inst✝³ : Category C
J : GrothendieckTopology C
D : Type w
inst✝² : Category D
inst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
P✝ : Cᵒᵖ ⥤ D
inst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
P Q : Cᵒᵖ ⥤ D
η : P ⟶ Q
hQ : Presheaf.IsSheaf J Q
⊢ toPlus J P ≫ plusMap J η = η ≫ toPlus J Q