1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Set.sep_of_ncard_eq
File: Mathlib/Data/Set/Card.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
s t : Set α
f : α → β
a : α
P : α → Prop
h : {x | x ∈ s ∧ P x}.ncard = s.ncard
ha : a ∈ s
hs : autoParam s.Finite _auto✝
⊢ {x | x ∈ s ∧ P x} ⊆ s
state_after: no goals
Theorem: Nat.euler_four_squares
File: Mathlib/NumberTheory/SumFourSquares.lean

tactic: rw [← Int.natCast_inj]
state_before: a b c d x y z w : ℕ
⊢ (↑a * ↑x - ↑b * ↑y - ↑c * ↑z - ↑d * ↑w).natAbs ^ 2 + (↑a * ↑y + ↑b * ↑x + ↑c * ↑w - ↑d * ↑z).natAbs ^ 2 +
        (↑a * ↑z - ↑b * ↑w + ↑c * ↑x + ↑d * ↑y).natAbs ^ 2 +
      (↑a * ↑w + ↑b * ↑z - ↑c * ↑y + ↑d * ↑x).natAbs ^ 2 =
    (a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2) * (x ^ 2 + y ^ 2 + z ^ 2 + w ^ 2)
state_after: a b c d x y z w : ℕ
⊢ ↑((↑a * ↑x - ↑b * ↑y - ↑c * ↑z - ↑d * ↑w).natAbs ^ 2 + (↑a * ↑y + ↑b * ↑x + ↑c * ↑w - ↑d * ↑z).natAbs ^ 2 +
          (↑a * ↑z - ↑b * ↑w + ↑c * ↑x + ↑d * ↑y).natAbs ^ 2 +
        (↑a * ↑w + ↑b * ↑z - ↑c * ↑y + ↑d * ↑x).natAbs ^ 2) =
    ↑((a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2) * (x ^ 2 + y ^ 2 + z ^ 2 + w ^ 2))

tactic: push_cast
state_before: a b c d x y z w : ℕ
⊢ ↑((↑a * ↑x - ↑b * ↑y - ↑c * ↑z - ↑d * ↑w).natAbs ^ 2 + (↑a * ↑y + ↑b * ↑x + ↑c * ↑w - ↑d * ↑z).natAbs ^ 2 +
          (↑a * ↑z - ↑b * ↑w + ↑c * ↑x + ↑d * ↑y).natAbs ^ 2 +
        (↑a * ↑w + ↑b * ↑z - ↑c * ↑y + ↑d * ↑x).natAbs ^ 2) =
    ↑((a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2) * (x ^ 2 + y ^ 2 + z ^ 2 + w ^ 2))
state_after: a b c d x y z w : ℕ
⊢ |↑a * ↑x - ↑b * ↑y - ↑c * ↑z - ↑d * ↑w| ^ 2 + |↑a * ↑y + ↑b * ↑x + ↑c * ↑w - ↑d * ↑z| ^ 2 +
        |↑a * ↑z - ↑b * ↑w + ↑c * ↑x + ↑d * ↑y| ^ 2 +
      |↑a * ↑w + ↑b * ↑z - ↑c * ↑y + ↑d * ↑x| ^ 2 =
    (↑a ^ 2 + ↑b ^ 2 + ↑c ^ 2 + ↑d ^ 2) * (↑x ^ 2 + ↑y ^ 2 + ↑z ^ 2 + ↑w ^ 2)

tactic: simp only [sq_abs, _root_.euler_four_squares]
state_before: a b c d x y z w : ℕ
⊢ |↑a * ↑x - ↑b * ↑y - ↑c * ↑z - ↑d * ↑w| ^ 2 + |↑a * ↑y + ↑b * ↑x + ↑c * ↑w - ↑d * ↑z| ^ 2 +
        |↑a * ↑z - ↑b * ↑w + ↑c * ↑x + ↑d * ↑y| ^ 2 +
      |↑a * ↑w + ↑b * ↑z - ↑c * ↑y + ↑d * ↑x| ^ 2 =
    (↑a ^ 2 + ↑b ^ 2 + ↑c ^ 2 + ↑d ^ 2) * (↑x ^ 2 + ↑y ^ 2 + ↑z ^ 2 + ↑w ^ 2)
state_after: no goals
Theorem: Set.preimage_const_add_Ioo
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simp [← Ioi_inter_Iio]
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
⊢ (fun x => a + x) ⁻¹' Ioo b c = Ioo (b - a) (c - a)
state_after: no goals
Theorem: CategoryTheory.Limits.prod.leftUnitor_inv_naturality
File: Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean

tactic: rw [Iso.inv_comp_eq, ← Category.assoc, Iso.eq_comp_inv, prod.leftUnitor_hom_naturality]
state_before: C : Type u
inst✝² : Category.{v, u} C
X Y : C
inst✝¹ : HasTerminal C
inst✝ : HasBinaryProducts C
f : X ⟶ Y
⊢ (leftUnitor X).inv ≫ map (𝟙 (⊤_ C)) f = f ≫ (leftUnitor Y).inv
state_after: no goals
Theorem: Function.funext_iff_of_subsingleton
File: Mathlib/Logic/Function/Basic.lean

tactic: refine ⟨fun h ↦ funext fun z ↦ ?_, fun h ↦ ?_⟩
state_before: α : Sort u_1
β : Sort u_2
γ : Sort u_3
f : α → β
inst✝ : Subsingleton α
g : α → β
x y : α
⊢ f x = g y ↔ f = g
state_after: case refine_1
α : Sort u_1
β : Sort u_2
γ : Sort u_3
f : α → β
inst✝ : Subsingleton α
g : α → β
x y : α
h : f x = g y
z : α
⊢ f z = g z

case refine_2
α : Sort u_1
β : Sort u_2
γ : Sort u_3
f : α → β
inst✝ : Subsingleton α
g : α → β
x y : α
h : f = g
⊢ f x = g y

tactic: rwa [Subsingleton.elim x z, Subsingleton.elim y z] at h
state_before: case refine_1
α : Sort u_1
β : Sort u_2
γ : Sort u_3
f : α → β
inst✝ : Subsingleton α
g : α → β
x y : α
h : f x = g y
z : α
⊢ f z = g z
state_after: no goals

tactic: rw [h, Subsingleton.elim x y]
state_before: case refine_2
α : Sort u_1
β : Sort u_2
γ : Sort u_3
f : α → β
inst✝ : Subsingleton α
g : α → β
x y : α
h : f = g
⊢ f x = g y
state_after: no goals
Theorem: CompHaus.lift_lifts
File: Mathlib/Topology/Category/Stonean/Basic.lean

tactic: simp [lift]
state_before: X Y : CompHaus
Z : Stonean
e : Z.compHaus ⟶ Y
f : X ⟶ Y
inst✝ : Epi f
⊢ lift e f ≫ f = e
state_after: no goals
Theorem: mul_left_eq_self₀
File: Mathlib/Algebra/GroupWithZero/Basic.lean

tactic: rw [one_mul]
state_before: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝ : CancelMonoidWithZero M₀
a b c : M₀
⊢ a * b = b ↔ a * b = 1 * b
state_after: no goals
Theorem: Equiv.Perm.length_toList
File: Mathlib/GroupTheory/Perm/Cycle/Concrete.lean

tactic: simp [toList]
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
p : Perm α
x : α
⊢ (p.toList x).length = (p.cycleOf x).support.card
state_after: no goals
Theorem: Ordnode.node3L_size
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: dsimp [node3L, node', size]
state_before: α : Type u_1
l : Ordnode α
x : α
m : Ordnode α
y : α
r : Ordnode α
⊢ (l.node3L x m y r).size = l.size + m.size + r.size + 2
state_after: α : Type u_1
l : Ordnode α
x : α
m : Ordnode α
y : α
r : Ordnode α
⊢ (((match l with
            | nil => 0
            | node sz l x r => sz) +
            match m with
            | nil => 0
            | node sz l x r => sz) +
          1 +
        match r with
        | nil => 0
        | node sz l x r => sz) +
      1 =
    (((match l with
          | nil => 0
          | node sz l x r => sz) +
          match m with
          | nil => 0
          | node sz l x r => sz) +
        match r with
        | nil => 0
        | node sz l x r => sz) +
      2

tactic: rw [add_right_comm _ 1]
state_before: α : Type u_1
l : Ordnode α
x : α
m : Ordnode α
y : α
r : Ordnode α
⊢ (((match l with
            | nil => 0
            | node sz l x r => sz) +
            match m with
            | nil => 0
            | node sz l x r => sz) +
          1 +
        match r with
        | nil => 0
        | node sz l x r => sz) +
      1 =
    (((match l with
          | nil => 0
          | node sz l x r => sz) +
          match m with
          | nil => 0
          | node sz l x r => sz) +
        match r with
        | nil => 0
        | node sz l x r => sz) +
      2
state_after: no goals
Theorem: Matroid.comap_basis'_iff
File: Mathlib/Data/Matroid/Map.lean

tactic: simp only [basis'_iff_basis_inter_ground, comap_ground_eq, comap_basis_iff, image_inter_preimage,
  subset_inter_iff, ← and_assoc, and_congr_left_iff, and_iff_left_iff_imp, and_imp]
state_before: α : Type u_1
β : Type u_2
f : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
I X : Set α
⊢ (N.comap f).Basis' I X ↔ N.Basis' (f '' I) (f '' X) ∧ InjOn f I ∧ I ⊆ X
state_after: α : Type u_1
β : Type u_2
f : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
I X : Set α
⊢ N.Basis (f '' I) (f '' X ∩ N.E) → InjOn f I → I ⊆ X → I ⊆ f ⁻¹' N.E

tactic: exact fun h _ _ ↦ (image_subset_iff.1 h.indep.subset_ground)
state_before: α : Type u_1
β : Type u_2
f : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
I X : Set α
⊢ N.Basis (f '' I) (f '' X ∩ N.E) → InjOn f I → I ⊆ X → I ⊆ f ⁻¹' N.E
state_after: no goals
Theorem: Num.cast_bit0
File: Mathlib/Data/Num/Lemmas.lean

tactic: rw [← bit0_of_bit0, _root_.bit0, cast_add]
state_before: α : Type u_1
inst✝ : Semiring α
n : Num
⊢ ↑n.bit0 = _root_.bit0 ↑n
state_after: α : Type u_1
inst✝ : Semiring α
n : Num
⊢ ↑n + ↑n = _root_.bit0 ↑n

tactic: rfl
state_before: α : Type u_1
inst✝ : Semiring α
n : Num
⊢ ↑n + ↑n = _root_.bit0 ↑n
state_after: no goals
Theorem: Multiset.prod_eq_one
File: Mathlib/Algebra/BigOperators/Group/Multiset.lean

tactic: induction' s using Quotient.inductionOn with l
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : CommMonoid α
inst✝ : CommMonoid β
s t : Multiset α
a : α
m : Multiset ι
f g : ι → α
h : ∀ x ∈ s, x = 1
⊢ s.prod = 1
state_after: case h
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : CommMonoid α
inst✝ : CommMonoid β
s t : Multiset α
a : α
m : Multiset ι
f g : ι → α
l : List α
h : ∀ x ∈ ⟦l⟧, x = 1
⊢ prod ⟦l⟧ = 1

tactic: simp [List.prod_eq_one h]
state_before: case h
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : CommMonoid α
inst✝ : CommMonoid β
s t : Multiset α
a : α
m : Multiset ι
f g : ι → α
l : List α
h : ∀ x ∈ ⟦l⟧, x = 1
⊢ prod ⟦l⟧ = 1
state_after: no goals
Theorem: Multiset.map_single_le_powerset
File: Mathlib/Data/Multiset/Powerset.lean

tactic: simp only [powerset_coe, quot_mk_to_coe, coe_le, map_coe]
state_before: α : Type u_1
s : Multiset α
l : List α
⊢ map singleton ⟦l⟧ ≤ powerset ⟦l⟧
state_after: α : Type u_1
s : Multiset α
l : List α
⊢ List.map singleton l <+~ List.map ofList l.sublists

tactic: show l.map (((↑) : List α → Multiset α) ∘ pure) <+~ (sublists l).map (↑)
state_before: α : Type u_1
s : Multiset α
l : List α
⊢ List.map singleton l <+~ List.map ofList l.sublists
state_after: α : Type u_1
s : Multiset α
l : List α
⊢ List.map (ofList ∘ pure) l <+~ List.map ofList l.sublists

tactic: rw [← List.map_map]
state_before: α : Type u_1
s : Multiset α
l : List α
⊢ List.map (ofList ∘ pure) l <+~ List.map ofList l.sublists
state_after: α : Type u_1
s : Multiset α
l : List α
⊢ List.map ofList (List.map pure l) <+~ List.map ofList l.sublists

tactic: exact ((map_pure_sublist_sublists _).map _).subperm
state_before: α : Type u_1
s : Multiset α
l : List α
⊢ List.map ofList (List.map pure l) <+~ List.map ofList l.sublists
state_after: no goals
Theorem: List.injective_foldl_comp
File: Mathlib/Data/List/Basic.lean

tactic: induction' l with lh lt l_ih generalizing f
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
l : List (α → α)
f : α → α
hl : ∀ (f : α → α), f ∈ l → Injective f
hf : Injective f
⊢ Injective (foldl comp f l)
state_after: case nil
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → α
hl : ∀ (f : α → α), f ∈ [] → Injective f
hf : Injective f
⊢ Injective (foldl comp f [])

case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
lh : α → α
lt : List (α → α)
l_ih : ∀ {f : α → α}, (∀ (f : α → α), f ∈ lt → Injective f) → Injective f → Injective (foldl comp f lt)
f : α → α
hl : ∀ (f : α → α), f ∈ lh :: lt → Injective f
hf : Injective f
⊢ Injective (foldl comp f (lh :: lt))

tactic: exact hf
state_before: case nil
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → α
hl : ∀ (f : α → α), f ∈ [] → Injective f
hf : Injective f
⊢ Injective (foldl comp f [])
state_after: no goals

tactic: apply l_ih fun _ h => hl _ (List.mem_cons_of_mem _ h)
state_before: case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
lh : α → α
lt : List (α → α)
l_ih : ∀ {f : α → α}, (∀ (f : α → α), f ∈ lt → Injective f) → Injective f → Injective (foldl comp f lt)
f : α → α
hl : ∀ (f : α → α), f ∈ lh :: lt → Injective f
hf : Injective f
⊢ Injective (foldl comp f (lh :: lt))
state_after: case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
lh : α → α
lt : List (α → α)
l_ih : ∀ {f : α → α}, (∀ (f : α → α), f ∈ lt → Injective f) → Injective f → Injective (foldl comp f lt)
f : α → α
hl : ∀ (f : α → α), f ∈ lh :: lt → Injective f
hf : Injective f
⊢ Injective (f ∘ lh)

tactic: apply Function.Injective.comp hf
state_before: case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
lh : α → α
lt : List (α → α)
l_ih : ∀ {f : α → α}, (∀ (f : α → α), f ∈ lt → Injective f) → Injective f → Injective (foldl comp f lt)
f : α → α
hl : ∀ (f : α → α), f ∈ lh :: lt → Injective f
hf : Injective f
⊢ Injective (f ∘ lh)
state_after: case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
lh : α → α
lt : List (α → α)
l_ih : ∀ {f : α → α}, (∀ (f : α → α), f ∈ lt → Injective f) → Injective f → Injective (foldl comp f lt)
f : α → α
hl : ∀ (f : α → α), f ∈ lh :: lt → Injective f
hf : Injective f
⊢ Injective lh

tactic: apply hl _ (List.mem_cons_self _ _)
state_before: case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
lh : α → α
lt : List (α → α)
l_ih : ∀ {f : α → α}, (∀ (f : α → α), f ∈ lt → Injective f) → Injective f → Injective (foldl comp f lt)
f : α → α
hl : ∀ (f : α → α), f ∈ lh :: lt → Injective f
hf : Injective f
⊢ Injective lh
state_after: no goals
Theorem: accPt_iff_nhds
File: Mathlib/Topology/Basic.lean

tactic: simp [acc_principal_iff_cluster, clusterPt_principal_iff, Set.Nonempty, exists_prop, and_assoc,
  @and_comm (¬_ = x)]
state_before: X : Type u
Y : Type v
ι : Sort w
α : Type u_1
β : Type u_2
x✝ : X
s s₁ s₂ t : Set X
p p₁ p₂ : X → Prop
inst✝ : TopologicalSpace X
x : X
C : Set X
⊢ AccPt x (𝓟 C) ↔ ∀ U ∈ 𝓝 x, ∃ y ∈ U ∩ C, y ≠ x
state_after: no goals
Theorem: ProbabilityTheory.kernel.snd_map_prod_id
File: Mathlib/Probability/Kernel/Composition.lean

tactic: rw [snd_map_prod _ hf measurable_id', kernel.map_id']
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
δ : Type u_4
mδ : MeasurableSpace δ
γ✝ : Type u_5
mγ✝ : MeasurableSpace γ✝
f✝ : β → γ✝
g : γ✝ → α
κ : ↥(kernel α β)
γ : Type u_6
mγ : MeasurableSpace γ
f : β → γ
hf : Measurable f
⊢ snd (map κ (fun a => (f a, a)) ⋯) = κ
state_after: no goals
Theorem: lowerClosure_sUnion
File: Mathlib/Order/UpperLower/Basic.lean

tactic: simp_rw [sUnion_eq_biUnion, lowerClosure_iUnion]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝¹ : Preorder α
inst✝ : Preorder β
s t : Set α
x : α
S : Set (Set α)
⊢ lowerClosure (⋃₀ S) = ⨆ s ∈ S, lowerClosure s
state_after: no goals
Theorem: existsUnique_sub_zsmul_mem_Ico
File: Mathlib/Algebra/Order/Archimedean.lean

tactic: simpa only [mem_Ico, le_sub_iff_add_le, zero_add, add_comm c, sub_lt_iff_lt_add', add_assoc] using
  existsUnique_zsmul_near_of_pos' ha (b - c)
state_before: α : Type u_1
M : Type u_2
inst✝¹ : LinearOrderedAddCommGroup α
inst✝ : Archimedean α
a : α
ha : 0 < a
b c : α
⊢ ∃! m, b - m • a ∈ Ico c (c + a)
state_after: no goals
Theorem: Unitization.isSelfAdjoint_inr
File: Mathlib/Algebra/Algebra/Unitization.lean

tactic: simp only [isSelfAdjoint_iff, ← inr_star, ← inr_mul, inr_injective.eq_iff]
state_before: R : Type u_1
A : Type u_2
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid A
inst✝³ : Mul A
inst✝² : SMulWithZero R A
inst✝¹ : StarAddMonoid R
inst✝ : Star A
a : A
⊢ IsSelfAdjoint ↑a ↔ IsSelfAdjoint a
state_after: no goals
Theorem: Finset.mem_biUnion
File: Mathlib/Data/Finset/Union.lean

tactic: simp only [mem_def, biUnion_val, Multiset.mem_dedup, Multiset.mem_bind, exists_prop]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s s₁ s₂ : Finset α
t t₁ t₂ : α → Finset β
inst✝ : DecidableEq β
b : β
⊢ b ∈ s.biUnion t ↔ ∃ a ∈ s, b ∈ t a
state_after: no goals
Theorem: Int.natCast_pos
File: Mathlib/Data/Int/Defs.lean

tactic: omega
state_before: a b c d m n✝ : ℤ
n : ℕ
⊢ 0 < ↑n ↔ 0 < n
state_after: no goals
Theorem: DirichletCharacter.absicssaOfAbsConv_eq_one
File: Mathlib/NumberTheory/LSeries/Dirichlet.lean

tactic: simpa only [abscissaOfAbsConv, LSeriesSummable_iff hn χ, ofReal_re, Set.Ioi_def,
  EReal.image_coe_Ioi, EReal.coe_one] using csInf_Ioo <| EReal.coe_lt_top _
state_before: N : ℕ
hn : N ≠ 0
χ : DirichletCharacter ℂ N
⊢ (abscissaOfAbsConv fun n => χ ↑n) = 1
state_after: no goals
Theorem: quotient_nhd_basis
File: Mathlib/Analysis/Normed/Group/Quotient.lean

tactic: have : ∀ ε : ℝ, mk '' ball (0 : M) ε = { x : M ⧸ S | ‖x‖ < ε } := by
  refine fun ε ↦ Set.ext <| forall_mk.2 fun x ↦ ?_
  rw [ball_zero_eq, mem_setOf_eq, norm_lt_iff, mem_image]
  exact exists_congr fun _ ↦ and_comm
state_before: M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
⊢ (𝓝 0).HasBasis (fun ε => 0 < ε) fun ε => {x | ‖x‖ < ε}
state_after: M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
this : ∀ (ε : ℝ), mk '' ball 0 ε = {x | ‖x‖ < ε}
⊢ (𝓝 0).HasBasis (fun ε => 0 < ε) fun ε => {x | ‖x‖ < ε}

tactic: rw [← mk_zero, nhds_eq, ← funext this]
state_before: M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
this : ∀ (ε : ℝ), mk '' ball 0 ε = {x | ‖x‖ < ε}
⊢ (𝓝 0).HasBasis (fun ε => 0 < ε) fun ε => {x | ‖x‖ < ε}
state_after: M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
this : ∀ (ε : ℝ), mk '' ball 0 ε = {x | ‖x‖ < ε}
⊢ (Filter.map mk (𝓝 0)).HasBasis (fun ε => 0 < ε) fun x => mk '' ball 0 x

tactic: exact .map _ Metric.nhds_basis_ball
state_before: M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
this : ∀ (ε : ℝ), mk '' ball 0 ε = {x | ‖x‖ < ε}
⊢ (Filter.map mk (𝓝 0)).HasBasis (fun ε => 0 < ε) fun x => mk '' ball 0 x
state_after: no goals

tactic: refine fun ε ↦ Set.ext <| forall_mk.2 fun x ↦ ?_
state_before: M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
⊢ ∀ (ε : ℝ), mk '' ball 0 ε = {x | ‖x‖ < ε}
state_after: M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
ε : ℝ
x : M
⊢ ↑x ∈ mk '' ball 0 ε ↔ ↑x ∈ {x | ‖x‖ < ε}

tactic: rw [ball_zero_eq, mem_setOf_eq, norm_lt_iff, mem_image]
state_before: M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
ε : ℝ
x : M
⊢ ↑x ∈ mk '' ball 0 ε ↔ ↑x ∈ {x | ‖x‖ < ε}
state_after: M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
ε : ℝ
x : M
⊢ (∃ x_1 ∈ {x | ‖x‖ < ε}, ↑x_1 = ↑x) ↔ ∃ m, ↑m = ↑x ∧ ‖m‖ < ε

tactic: exact exists_congr fun _ ↦ and_comm
state_before: M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
ε : ℝ
x : M
⊢ (∃ x_1 ∈ {x | ‖x‖ < ε}, ↑x_1 = ↑x) ↔ ∃ m, ↑m = ↑x ∧ ‖m‖ < ε
state_after: no goals
Theorem: Polynomial.cyclotomic_one
File: Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean

tactic: have hspec : map (Int.castRingHom ℂ) (X - 1) = cyclotomic' 1 ℂ := by
  simp only [cyclotomic'_one, PNat.one_coe, map_X, Polynomial.map_one, Polynomial.map_sub]
state_before: R : Type u_1
inst✝ : Ring R
⊢ cyclotomic 1 R = X - 1
state_after: R : Type u_1
inst✝ : Ring R
hspec : map (Int.castRingHom ℂ) (X - 1) = cyclotomic' 1 ℂ
⊢ cyclotomic 1 R = X - 1

tactic: symm
state_before: R : Type u_1
inst✝ : Ring R
hspec : map (Int.castRingHom ℂ) (X - 1) = cyclotomic' 1 ℂ
⊢ cyclotomic 1 R = X - 1
state_after: R : Type u_1
inst✝ : Ring R
hspec : map (Int.castRingHom ℂ) (X - 1) = cyclotomic' 1 ℂ
⊢ X - 1 = cyclotomic 1 R

tactic: rw [← map_cyclotomic_int, ← int_cyclotomic_unique hspec]
state_before: R : Type u_1
inst✝ : Ring R
hspec : map (Int.castRingHom ℂ) (X - 1) = cyclotomic' 1 ℂ
⊢ X - 1 = cyclotomic 1 R
state_after: R : Type u_1
inst✝ : Ring R
hspec : map (Int.castRingHom ℂ) (X - 1) = cyclotomic' 1 ℂ
⊢ X - 1 = map (Int.castRingHom R) (X - 1)

tactic: simp only [map_X, Polynomial.map_one, Polynomial.map_sub]
state_before: R : Type u_1
inst✝ : Ring R
hspec : map (Int.castRingHom ℂ) (X - 1) = cyclotomic' 1 ℂ
⊢ X - 1 = map (Int.castRingHom R) (X - 1)
state_after: no goals

tactic: simp only [cyclotomic'_one, PNat.one_coe, map_X, Polynomial.map_one, Polynomial.map_sub]
state_before: R : Type u_1
inst✝ : Ring R
⊢ map (Int.castRingHom ℂ) (X - 1) = cyclotomic' 1 ℂ
state_after: no goals
Theorem: Real.summable_pow_div_factorial
File: Mathlib/Analysis/SpecificLimits/Normed.lean

tactic: have A : (0 : ℝ) < ⌊‖x‖⌋₊ + 1 := zero_lt_one.trans_le (by simp)
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
x : ℝ
⊢ Summable fun n => x ^ n / ↑n !
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
x : ℝ
A : 0 < ↑⌊‖x‖⌋₊ + 1
⊢ Summable fun n => x ^ n / ↑n !

tactic: have B : ‖x‖ / (⌊‖x‖⌋₊ + 1) < 1 := (div_lt_one A).2 (Nat.lt_floor_add_one _)
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
x : ℝ
A : 0 < ↑⌊‖x‖⌋₊ + 1
⊢ Summable fun n => x ^ n / ↑n !
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
x : ℝ
A : 0 < ↑⌊‖x‖⌋₊ + 1
B : ‖x‖ / (↑⌊‖x‖⌋₊ + 1) < 1
⊢ Summable fun n => x ^ n / ↑n !

tactic: suffices ∀ n ≥ ⌊‖x‖⌋₊, ‖x ^ (n + 1) / (n + 1)!‖ ≤ ‖x‖ / (⌊‖x‖⌋₊ + 1) * ‖x ^ n / ↑n !‖ from
  summable_of_ratio_norm_eventually_le B (eventually_atTop.2 ⟨⌊‖x‖⌋₊, this⟩)
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
x : ℝ
A : 0 < ↑⌊‖x‖⌋₊ + 1
B : ‖x‖ / (↑⌊‖x‖⌋₊ + 1) < 1
⊢ Summable fun n => x ^ n / ↑n !
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
x : ℝ
A : 0 < ↑⌊‖x‖⌋₊ + 1
B : ‖x‖ / (↑⌊‖x‖⌋₊ + 1) < 1
⊢ ∀ n ≥ ⌊‖x‖⌋₊, ‖x ^ (n + 1) / ↑(n + 1)!‖ ≤ ‖x‖ / (↑⌊‖x‖⌋₊ + 1) * ‖x ^ n / ↑n !‖

tactic: intro n hn
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
x : ℝ
A : 0 < ↑⌊‖x‖⌋₊ + 1
B : ‖x‖ / (↑⌊‖x‖⌋₊ + 1) < 1
⊢ ∀ n ≥ ⌊‖x‖⌋₊, ‖x ^ (n + 1) / ↑(n + 1)!‖ ≤ ‖x‖ / (↑⌊‖x‖⌋₊ + 1) * ‖x ^ n / ↑n !‖
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
x : ℝ
A : 0 < ↑⌊‖x‖⌋₊ + 1
B : ‖x‖ / (↑⌊‖x‖⌋₊ + 1) < 1
n : ℕ
hn : n ≥ ⌊‖x‖⌋₊
⊢ ‖x ^ (n + 1) / ↑(n + 1)!‖ ≤ ‖x‖ / (↑⌊‖x‖⌋₊ + 1) * ‖x ^ n / ↑n !‖

tactic: calc
  ‖x ^ (n + 1) / (n + 1)!‖ = ‖x‖ / (n + 1) * ‖x ^ n / (n !)‖ := by
    rw [_root_.pow_succ', Nat.factorial_succ, Nat.cast_mul, ← _root_.div_mul_div_comm, norm_mul,
      norm_div, Real.norm_natCast, Nat.cast_succ]
  _ ≤ ‖x‖ / (⌊‖x‖⌋₊ + 1) * ‖x ^ n / (n !)‖ := by gcongr
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
x : ℝ
A : 0 < ↑⌊‖x‖⌋₊ + 1
B : ‖x‖ / (↑⌊‖x‖⌋₊ + 1) < 1
n : ℕ
hn : n ≥ ⌊‖x‖⌋₊
⊢ ‖x ^ (n + 1) / ↑(n + 1)!‖ ≤ ‖x‖ / (↑⌊‖x‖⌋₊ + 1) * ‖x ^ n / ↑n !‖
state_after: no goals

tactic: simp
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
x : ℝ
⊢ 1 ≤ ↑⌊‖x‖⌋₊ + 1
state_after: no goals

tactic: rw [_root_.pow_succ', Nat.factorial_succ, Nat.cast_mul, ← _root_.div_mul_div_comm, norm_mul,
  norm_div, Real.norm_natCast, Nat.cast_succ]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
x : ℝ
A : 0 < ↑⌊‖x‖⌋₊ + 1
B : ‖x‖ / (↑⌊‖x‖⌋₊ + 1) < 1
n : ℕ
hn : n ≥ ⌊‖x‖⌋₊
⊢ ‖x ^ (n + 1) / ↑(n + 1)!‖ = ‖x‖ / (↑n + 1) * ‖x ^ n / ↑n !‖
state_after: no goals

tactic: gcongr
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
x : ℝ
A : 0 < ↑⌊‖x‖⌋₊ + 1
B : ‖x‖ / (↑⌊‖x‖⌋₊ + 1) < 1
n : ℕ
hn : n ≥ ⌊‖x‖⌋₊
⊢ ‖x‖ / (↑n + 1) * ‖x ^ n / ↑n !‖ ≤ ‖x‖ / (↑⌊‖x‖⌋₊ + 1) * ‖x ^ n / ↑n !‖
state_after: no goals
Theorem: LinearMap.polyCharpoly_natDegree
File: Mathlib/Algebra/Module/LinearMap/Polynomial.lean

tactic: rw [polyCharpoly, polyCharpolyAux, (charpoly.univ_monic _ _).natDegree_map,
  charpoly.univ_natDegree, finrank_eq_card_chooseBasisIndex]
state_before: R : Type u_1
L : Type u_2
M : Type u_3
n : Type u_4
ι : Type u_5
ι' : Type u_6
ιM : Type u_7
inst✝¹² : CommRing R
inst✝¹¹ : AddCommGroup L
inst✝¹⁰ : Module R L
inst✝⁹ : AddCommGroup M
inst✝⁸ : Module R M
φ : L →ₗ[R] Module.End R M
inst✝⁷ : Fintype ι
inst✝⁶ : Fintype ι'
inst✝⁵ : Fintype ιM
inst✝⁴ : DecidableEq ι
inst✝³ : DecidableEq ι'
inst✝² : Module.Free R M
inst✝¹ : Module.Finite R M
b : Basis ι R L
inst✝ : Nontrivial R
⊢ (φ.polyCharpoly b).natDegree = finrank R M
state_after: no goals
Theorem: Nat.map_swap_divisorsAntidiagonal
File: Mathlib/NumberTheory/Divisors.lean

tactic: rw [← coe_inj, coe_map, Equiv.coe_toEmbedding, Equiv.coe_prodComm,
  Set.image_swap_eq_preimage_swap]
state_before: n : ℕ
⊢ map (Equiv.prodComm ℕ ℕ).toEmbedding n.divisorsAntidiagonal = n.divisorsAntidiagonal
state_after: n : ℕ
⊢ Prod.swap ⁻¹' ↑n.divisorsAntidiagonal = ↑n.divisorsAntidiagonal

tactic: ext
state_before: n : ℕ
⊢ Prod.swap ⁻¹' ↑n.divisorsAntidiagonal = ↑n.divisorsAntidiagonal
state_after: case h
n : ℕ
x✝ : ℕ × ℕ
⊢ x✝ ∈ Prod.swap ⁻¹' ↑n.divisorsAntidiagonal ↔ x✝ ∈ ↑n.divisorsAntidiagonal

tactic: exact swap_mem_divisorsAntidiagonal
state_before: case h
n : ℕ
x✝ : ℕ × ℕ
⊢ x✝ ∈ Prod.swap ⁻¹' ↑n.divisorsAntidiagonal ↔ x✝ ∈ ↑n.divisorsAntidiagonal
state_after: no goals