1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Polynomial.card_roots
File: Mathlib/Algebra/Polynomial/Roots.lean

tactic: classical
unfold roots
rw [dif_neg hp0]
exact (Classical.choose_spec (exists_multiset_roots hp0)).1
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
hp0 : p ≠ 0
⊢ ↑(Multiset.card p.roots) ≤ p.degree
state_after: no goals

tactic: unfold roots
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
hp0 : p ≠ 0
⊢ ↑(Multiset.card p.roots) ≤ p.degree
state_after: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
hp0 : p ≠ 0
⊢ ↑(Multiset.card (if h : p = 0 then ∅ else Classical.choose ⋯)) ≤ p.degree

tactic: rw [dif_neg hp0]
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
hp0 : p ≠ 0
⊢ ↑(Multiset.card (if h : p = 0 then ∅ else Classical.choose ⋯)) ≤ p.degree
state_after: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
hp0 : p ≠ 0
⊢ ↑(Multiset.card (Classical.choose ⋯)) ≤ p.degree

tactic: exact (Classical.choose_spec (exists_multiset_roots hp0)).1
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
hp0 : p ≠ 0
⊢ ↑(Multiset.card (Classical.choose ⋯)) ≤ p.degree
state_after: no goals
Theorem: AdicCompletion.transitionMap_comp
File: Mathlib/RingTheory/AdicCompletion/Basic.lean

tactic: ext
state_before: R : Type u_1
inst✝⁴ : CommRing R
I : Ideal R
M : Type u_2
inst✝³ : AddCommGroup M
inst✝² : Module R M
N : Type u_3
inst✝¹ : AddCommGroup N
inst✝ : Module R N
m n k : ℕ
hmn : m ≤ n
hnk : n ≤ k
⊢ transitionMap I M hmn ∘ₗ transitionMap I M hnk = transitionMap I M ⋯
state_after: case h.h
R : Type u_1
inst✝⁴ : CommRing R
I : Ideal R
M : Type u_2
inst✝³ : AddCommGroup M
inst✝² : Module R M
N : Type u_3
inst✝¹ : AddCommGroup N
inst✝ : Module R N
m n k : ℕ
hmn : m ≤ n
hnk : n ≤ k
x✝ : M
⊢ ((transitionMap I M hmn ∘ₗ transitionMap I M hnk) ∘ₗ (I ^ k • ⊤).mkQ) x✝ = (transitionMap I M ⋯ ∘ₗ (I ^ k • ⊤).mkQ) x✝

tactic: simp
state_before: case h.h
R : Type u_1
inst✝⁴ : CommRing R
I : Ideal R
M : Type u_2
inst✝³ : AddCommGroup M
inst✝² : Module R M
N : Type u_3
inst✝¹ : AddCommGroup N
inst✝ : Module R N
m n k : ℕ
hmn : m ≤ n
hnk : n ≤ k
x✝ : M
⊢ ((transitionMap I M hmn ∘ₗ transitionMap I M hnk) ∘ₗ (I ^ k • ⊤).mkQ) x✝ = (transitionMap I M ⋯ ∘ₗ (I ^ k • ⊤).mkQ) x✝
state_after: no goals
Theorem: forall_or_exists_not
File: Mathlib/Logic/Basic.lean

tactic: rw [← not_forall]
state_before: α : Sort u_1
β : Sort u_2
p q P : α → Prop
⊢ (∀ (a : α), P a) ∨ ∃ a, ¬P a
state_after: α : Sort u_1
β : Sort u_2
p q P : α → Prop
⊢ (∀ (a : α), P a) ∨ ¬∀ (x : α), P x

tactic: exact em _
state_before: α : Sort u_1
β : Sort u_2
p q P : α → Prop
⊢ (∀ (a : α), P a) ∨ ¬∀ (x : α), P x
state_after: no goals
Theorem: PadicInt.coe_eq_zero
File: Mathlib/NumberTheory/Padics/PadicIntegers.lean

tactic: rw [← coe_zero, Subtype.coe_inj]
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
z : ℤ_[p]
⊢ ↑z = 0 ↔ z = 0
state_after: no goals
Theorem: List.toFinsupp_concat_eq_toFinsupp_add_single
File: Mathlib/Data/List/ToFinsupp.lean

tactic: classical rw [toFinsupp_append, toFinsupp_singleton, Finsupp.embDomain_single,
  addLeftEmbedding_apply, add_zero]
state_before: M : Type u_1
inst✝⁴ : Zero M
l : List M
inst✝³ : DecidablePred fun x => l.getD x 0 ≠ 0
n : ℕ
R : Type u_2
inst✝² : AddZeroClass R
x : R
xs : List R
inst✝¹ : DecidablePred fun i => (xs ++ [x]).getD i 0 ≠ 0
inst✝ : DecidablePred fun i => xs.getD i 0 ≠ 0
⊢ (xs ++ [x]).toFinsupp = xs.toFinsupp + Finsupp.single xs.length x
state_after: no goals

tactic: rw [toFinsupp_append, toFinsupp_singleton, Finsupp.embDomain_single,
addLeftEmbedding_apply, add_zero]
state_before: M : Type u_1
inst✝⁴ : Zero M
l : List M
inst✝³ : DecidablePred fun x => l.getD x 0 ≠ 0
n : ℕ
R : Type u_2
inst✝² : AddZeroClass R
x : R
xs : List R
inst✝¹ : DecidablePred fun i => (xs ++ [x]).getD i 0 ≠ 0
inst✝ : DecidablePred fun i => xs.getD i 0 ≠ 0
⊢ (xs ++ [x]).toFinsupp = xs.toFinsupp + Finsupp.single xs.length x
state_after: no goals
Theorem: Monoid.PushoutI.NormalWord.prod_base_smul
File: Mathlib/GroupTheory/PushoutI.lean

tactic: simp only [base_smul_def', prod, map_mul, mul_assoc]
state_before: ι : Type u_1
G : ι → Type u_2
H : Type u_3
K : Type u_4
inst✝⁴ : Monoid K
inst✝³ : (i : ι) → Group (G i)
inst✝² : Group H
φ : (i : ι) → H →* G i
d : Transversal φ
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
h : H
w : NormalWord d
⊢ (h • w).prod = (base φ) h * w.prod
state_after: no goals
Theorem: Rat.le_toNNRat_iff_coe_le'
File: Mathlib/Data/NNRat/Defs.lean

tactic: simp only [(hp.trans_le q.coe_nonneg).not_le, toNNRat_eq_zero.2 hp.le, hq.not_le]
state_before: p q✝ : ℚ
q : ℚ≥0
hq : 0 < q
hp : p < 0
⊢ q ≤ p.toNNRat ↔ ↑q ≤ p
state_after: no goals
Theorem: Vector.get_set_of_ne
File: Mathlib/Data/Vector/Basic.lean

tactic: cases v
state_before: n : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
v : Vector α n
i j : Fin n
h : i ≠ j
a : α
⊢ (v.set i a).get j = v.get j
state_after: case mk
n : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
i j : Fin n
h : i ≠ j
a : α
val✝ : List α
property✝ : val✝.length = n
⊢ (set ⟨val✝, property✝⟩ i a).get j = get ⟨val✝, property✝⟩ j

tactic: cases i
state_before: case mk
n : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
i j : Fin n
h : i ≠ j
a : α
val✝ : List α
property✝ : val✝.length = n
⊢ (set ⟨val✝, property✝⟩ i a).get j = get ⟨val✝, property✝⟩ j
state_after: case mk.mk
n : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
j : Fin n
a : α
val✝¹ : List α
property✝ : val✝¹.length = n
val✝ : ℕ
isLt✝ : val✝ < n
h : ⟨val✝, isLt✝⟩ ≠ j
⊢ (set ⟨val✝¹, property✝⟩ ⟨val✝, isLt✝⟩ a).get j = get ⟨val✝¹, property✝⟩ j

tactic: cases j
state_before: case mk.mk
n : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
j : Fin n
a : α
val✝¹ : List α
property✝ : val✝¹.length = n
val✝ : ℕ
isLt✝ : val✝ < n
h : ⟨val✝, isLt✝⟩ ≠ j
⊢ (set ⟨val✝¹, property✝⟩ ⟨val✝, isLt✝⟩ a).get j = get ⟨val✝¹, property✝⟩ j
state_after: case mk.mk.mk
n : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
a : α
val✝² : List α
property✝ : val✝².length = n
val✝¹ : ℕ
isLt✝¹ : val✝¹ < n
val✝ : ℕ
isLt✝ : val✝ < n
h : ⟨val✝¹, isLt✝¹⟩ ≠ ⟨val✝, isLt✝⟩
⊢ (set ⟨val✝², property✝⟩ ⟨val✝¹, isLt✝¹⟩ a).get ⟨val✝, isLt✝⟩ = get ⟨val✝², property✝⟩ ⟨val✝, isLt✝⟩

tactic: simp only [get_eq_get, toList_set, toList_mk, Fin.cast_mk, List.get_eq_getElem]
state_before: case mk.mk.mk
n : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
a : α
val✝² : List α
property✝ : val✝².length = n
val✝¹ : ℕ
isLt✝¹ : val✝¹ < n
val✝ : ℕ
isLt✝ : val✝ < n
h : ⟨val✝¹, isLt✝¹⟩ ≠ ⟨val✝, isLt✝⟩
⊢ (set ⟨val✝², property✝⟩ ⟨val✝¹, isLt✝¹⟩ a).get ⟨val✝, isLt✝⟩ = get ⟨val✝², property✝⟩ ⟨val✝, isLt✝⟩
state_after: case mk.mk.mk
n : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
a : α
val✝² : List α
property✝ : val✝².length = n
val✝¹ : ℕ
isLt✝¹ : val✝¹ < n
val✝ : ℕ
isLt✝ : val✝ < n
h : ⟨val✝¹, isLt✝¹⟩ ≠ ⟨val✝, isLt✝⟩
⊢ (val✝².set val✝¹ a)[val✝] = val✝²[val✝]

tactic: rw [List.getElem_set_of_ne]
state_before: case mk.mk.mk
n : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
a : α
val✝² : List α
property✝ : val✝².length = n
val✝¹ : ℕ
isLt✝¹ : val✝¹ < n
val✝ : ℕ
isLt✝ : val✝ < n
h : ⟨val✝¹, isLt✝¹⟩ ≠ ⟨val✝, isLt✝⟩
⊢ (val✝².set val✝¹ a)[val✝] = val✝²[val✝]
state_after: case mk.mk.mk.h
n : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
a : α
val✝² : List α
property✝ : val✝².length = n
val✝¹ : ℕ
isLt✝¹ : val✝¹ < n
val✝ : ℕ
isLt✝ : val✝ < n
h : ⟨val✝¹, isLt✝¹⟩ ≠ ⟨val✝, isLt✝⟩
⊢ val✝¹ ≠ val✝

tactic: simpa using h
state_before: case mk.mk.mk.h
n : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
a : α
val✝² : List α
property✝ : val✝².length = n
val✝¹ : ℕ
isLt✝¹ : val✝¹ < n
val✝ : ℕ
isLt✝ : val✝ < n
h : ⟨val✝¹, isLt✝¹⟩ ≠ ⟨val✝, isLt✝⟩
⊢ val✝¹ ≠ val✝
state_after: no goals
Theorem: List.prod_eq_pow_single
File: Mathlib/Algebra/BigOperators/Group/List.lean

tactic: rw [map_id]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
G : Type u_7
inst✝³ : Monoid M
inst✝² : Monoid N
inst✝¹ : Monoid P
l l₁ l₂ : List M
a✝ : M
inst✝ : DecidableEq M
a : M
h : ∀ (a' : M), a' ≠ a → a' ∈ l → a' = 1
⊢ l.prod = (map id l).prod
state_after: no goals
Theorem: compl_top
File: Mathlib/Order/Heyting/Basic.lean

tactic: rw [le_compl_iff_disjoint_right, disjoint_top, le_bot_iff]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : HeytingAlgebra α
a✝ b c a : α
⊢ a ≤ ⊤ᶜ ↔ a ≤ ⊥
state_after: no goals
Theorem: WeierstrassCurve.Projective.equation_zero
File: Mathlib/AlgebraicGeometry/EllipticCurve/Projective.lean

tactic: matrix_simp
state_before: R : Type u
inst✝ : CommRing R
W : Projective R
Y : R
⊢ ![0, Y, 0] 1 ^ 2 * ![0, Y, 0] 2 + W.a₁ * ![0, Y, 0] 0 * ![0, Y, 0] 1 * ![0, Y, 0] 2 +
      W.a₃ * ![0, Y, 0] 1 * ![0, Y, 0] 2 ^ 2 =
    ![0, Y, 0] 0 ^ 3 + W.a₂ * ![0, Y, 0] 0 ^ 2 * ![0, Y, 0] 2 + W.a₄ * ![0, Y, 0] 0 * ![0, Y, 0] 2 ^ 2 +
      W.a₆ * ![0, Y, 0] 2 ^ 3
state_after: R : Type u
inst✝ : CommRing R
W : Projective R
Y : R
⊢ Y ^ 2 * 0 + W.a₁ * 0 * Y * 0 + W.a₃ * Y * 0 ^ 2 = 0 ^ 3 + W.a₂ * 0 ^ 2 * 0 + W.a₄ * 0 * 0 ^ 2 + W.a₆ * 0 ^ 3

tactic: ring1
state_before: R : Type u
inst✝ : CommRing R
W : Projective R
Y : R
⊢ Y ^ 2 * 0 + W.a₁ * 0 * Y * 0 + W.a₃ * Y * 0 ^ 2 = 0 ^ 3 + W.a₂ * 0 ^ 2 * 0 + W.a₄ * 0 * 0 ^ 2 + W.a₆ * 0 ^ 3
state_after: no goals
Theorem: MeasureTheory.setAverage_congr_fun
File: Mathlib/MeasureTheory/Integral/Average.lean

tactic: simp only [average_eq, setIntegral_congr_ae hs h]
state_before: α : Type u_1
E : Type u_2
F : Type u_3
m0 : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace F
μ ν : Measure α
s t : Set α
f g : α → E
hs : MeasurableSet s
h : ∀ᵐ (x : α) ∂μ, x ∈ s → f x = g x
⊢ ⨍ (x : α) in s, f x ∂μ = ⨍ (x : α) in s, g x ∂μ
state_after: no goals
Theorem: Real.sum_sqrt_mul_sqrt_le
File: Mathlib/Data/Real/Sqrt.lean

tactic: simpa [*] using sum_mul_le_sqrt_mul_sqrt _ (fun x ↦ √(f x)) (fun x ↦ √(g x))
state_before: α : Type u_1
inst✝ : TopologicalSpace α
f✝ : α → ℝ
s✝ : Set α
x : α
ι : Type u_2
f g : ι → ℝ
s : Finset ι
hf : ∀ (i : ι), 0 ≤ f i
hg : ∀ (i : ι), 0 ≤ g i
⊢ ∑ i ∈ s, √(f i) * √(g i) ≤ √(∑ i ∈ s, f i) * √(∑ i ∈ s, g i)
state_after: no goals
Theorem: Nat.minFac_le_div
File: Mathlib/Data/Nat/Prime.lean

tactic: rw [h0, mul_zero]
state_before: n✝ n : ℕ
pos : 0 < n
np : ¬Prime n
h0 : n = n.minFac * 0
⊢ ¬0 < n
state_after: n✝ n : ℕ
pos : 0 < n
np : ¬Prime n
h0 : n = n.minFac * 0
⊢ ¬0 < 0

tactic: decide
state_before: n✝ n : ℕ
pos : 0 < n
np : ¬Prime n
h0 : n = n.minFac * 0
⊢ ¬0 < 0
state_after: no goals

tactic: rw [mul_one] at h1
state_before: n✝ n : ℕ
pos : 0 < n
np : ¬Prime n
h1 : n = n.minFac * 1
⊢ n.minFac ≤ n / n.minFac
state_after: n✝ n : ℕ
pos : 0 < n
np : ¬Prime n
h1 : n = n.minFac
⊢ n.minFac ≤ n / n.minFac

tactic: rw [prime_def_minFac, not_and_or, ← h1, eq_self_iff_true, _root_.not_true, or_false_iff,
  not_le] at np
state_before: n✝ n : ℕ
pos : 0 < n
np : ¬Prime n
h1 : n = n.minFac
⊢ n.minFac ≤ n / n.minFac
state_after: n✝ n : ℕ
pos : 0 < n
np : n < 2
h1 : n = n.minFac
⊢ n.minFac ≤ n / n.minFac

tactic: rw [le_antisymm (le_of_lt_succ np) (succ_le_of_lt pos), minFac_one, Nat.div_one]
state_before: n✝ n : ℕ
pos : 0 < n
np : n < 2
h1 : n = n.minFac
⊢ n.minFac ≤ n / n.minFac
state_after: no goals

tactic: conv_rhs =>
  congr
  rw [hx]
state_before: n✝ n : ℕ
pos : 0 < n
np : ¬Prime n
x : ℕ
hx : n = n.minFac * (x + 2)
⊢ n.minFac ≤ n / n.minFac
state_after: n✝ n : ℕ
pos : 0 < n
np : ¬Prime n
x : ℕ
hx : n = n.minFac * (x + 2)
⊢ n.minFac ≤ n.minFac * (x + 2) / n.minFac

tactic: rw [Nat.mul_div_cancel_left _ (minFac_pos _)]
state_before: n✝ n : ℕ
pos : 0 < n
np : ¬Prime n
x : ℕ
hx : n = n.minFac * (x + 2)
⊢ n.minFac ≤ n.minFac * (x + 2) / n.minFac
state_after: n✝ n : ℕ
pos : 0 < n
np : ¬Prime n
x : ℕ
hx : n = n.minFac * (x + 2)
⊢ n.minFac ≤ x + 2

tactic: exact minFac_le_of_dvd (le_add_left 2 x) ⟨minFac n, by rwa [mul_comm]⟩
state_before: n✝ n : ℕ
pos : 0 < n
np : ¬Prime n
x : ℕ
hx : n = n.minFac * (x + 2)
⊢ n.minFac ≤ x + 2
state_after: no goals

tactic: rwa [mul_comm]
state_before: n✝ n : ℕ
pos : 0 < n
np : ¬Prime n
x : ℕ
hx : n = n.minFac * (x + 2)
⊢ n = (x + 2) * n.minFac
state_after: no goals
Theorem: TopCat.GlueData.preimage_range
File: Mathlib/Topology/Gluing.lean

tactic: rw [← Set.preimage_image_eq (Set.range (D.f j i)) (D.ι_injective j), ← Set.image_univ, ←
  Set.image_univ, ← Set.image_comp, ← coe_comp, Set.image_univ, Set.image_univ, ← image_inter,
  Set.preimage_range_inter]
state_before: D : GlueData
i j : D.J
⊢ ⇑(D.ι j) ⁻¹' Set.range ⇑(D.ι i) = Set.range ⇑(D.f j i)
state_after: no goals
Theorem: Finset.sup_eq_biUnion
File: Mathlib/Data/Finset/Lattice.lean

tactic: ext
state_before: F : Type u_1
α✝ : Type u_2
β✝ : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
α : Type u_7
β : Type u_8
inst✝ : DecidableEq β
s : Finset α
t : α → Finset β
⊢ s.sup t = s.biUnion t
state_after: case a
F : Type u_1
α✝ : Type u_2
β✝ : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
α : Type u_7
β : Type u_8
inst✝ : DecidableEq β
s : Finset α
t : α → Finset β
a✝ : β
⊢ a✝ ∈ s.sup t ↔ a✝ ∈ s.biUnion t

tactic: rw [mem_sup, mem_biUnion]
state_before: case a
F : Type u_1
α✝ : Type u_2
β✝ : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
α : Type u_7
β : Type u_8
inst✝ : DecidableEq β
s : Finset α
t : α → Finset β
a✝ : β
⊢ a✝ ∈ s.sup t ↔ a✝ ∈ s.biUnion t
state_after: no goals
Theorem: ArithmeticFunction.IsMultiplicative.iff_ne_zero
File: Mathlib/NumberTheory/ArithmeticFunction.lean

tactic: refine and_congr_right' (forall₂_congr fun m n => ⟨fun h _ _ => h, fun h hmn => ?_⟩)
state_before: R : Type u_1
inst✝ : MonoidWithZero R
f : ArithmeticFunction R
⊢ f.IsMultiplicative ↔ f 1 = 1 ∧ ∀ {m n : ℕ}, m ≠ 0 → n ≠ 0 → m.Coprime n → f (m * n) = f m * f n
state_after: R : Type u_1
inst✝ : MonoidWithZero R
f : ArithmeticFunction R
m n : ℕ
h : m ≠ 0 → n ≠ 0 → m.Coprime n → f (m * n) = f m * f n
hmn : m.Coprime n
⊢ f (m * n) = f m * f n

tactic: rcases eq_or_ne m 0 with (rfl | hm)
state_before: R : Type u_1
inst✝ : MonoidWithZero R
f : ArithmeticFunction R
m n : ℕ
h : m ≠ 0 → n ≠ 0 → m.Coprime n → f (m * n) = f m * f n
hmn : m.Coprime n
⊢ f (m * n) = f m * f n
state_after: case inl
R : Type u_1
inst✝ : MonoidWithZero R
f : ArithmeticFunction R
n : ℕ
h : 0 ≠ 0 → n ≠ 0 → Coprime 0 n → f (0 * n) = f 0 * f n
hmn : Coprime 0 n
⊢ f (0 * n) = f 0 * f n

case inr
R : Type u_1
inst✝ : MonoidWithZero R
f : ArithmeticFunction R
m n : ℕ
h : m ≠ 0 → n ≠ 0 → m.Coprime n → f (m * n) = f m * f n
hmn : m.Coprime n
hm : m ≠ 0
⊢ f (m * n) = f m * f n

tactic: rcases eq_or_ne n 0 with (rfl | hn)
state_before: case inr
R : Type u_1
inst✝ : MonoidWithZero R
f : ArithmeticFunction R
m n : ℕ
h : m ≠ 0 → n ≠ 0 → m.Coprime n → f (m * n) = f m * f n
hmn : m.Coprime n
hm : m ≠ 0
⊢ f (m * n) = f m * f n
state_after: case inr.inl
R : Type u_1
inst✝ : MonoidWithZero R
f : ArithmeticFunction R
m : ℕ
hm : m ≠ 0
h : m ≠ 0 → 0 ≠ 0 → m.Coprime 0 → f (m * 0) = f m * f 0
hmn : m.Coprime 0
⊢ f (m * 0) = f m * f 0

case inr.inr
R : Type u_1
inst✝ : MonoidWithZero R
f : ArithmeticFunction R
m n : ℕ
h : m ≠ 0 → n ≠ 0 → m.Coprime n → f (m * n) = f m * f n
hmn : m.Coprime n
hm : m ≠ 0
hn : n ≠ 0
⊢ f (m * n) = f m * f n

tactic: exact h hm hn hmn
state_before: case inr.inr
R : Type u_1
inst✝ : MonoidWithZero R
f : ArithmeticFunction R
m n : ℕ
h : m ≠ 0 → n ≠ 0 → m.Coprime n → f (m * n) = f m * f n
hmn : m.Coprime n
hm : m ≠ 0
hn : n ≠ 0
⊢ f (m * n) = f m * f n
state_after: no goals

tactic: simp
state_before: case inl
R : Type u_1
inst✝ : MonoidWithZero R
f : ArithmeticFunction R
n : ℕ
h : 0 ≠ 0 → n ≠ 0 → Coprime 0 n → f (0 * n) = f 0 * f n
hmn : Coprime 0 n
⊢ f (0 * n) = f 0 * f n
state_after: no goals

tactic: simp
state_before: case inr.inl
R : Type u_1
inst✝ : MonoidWithZero R
f : ArithmeticFunction R
m : ℕ
hm : m ≠ 0
h : m ≠ 0 → 0 ≠ 0 → m.Coprime 0 → f (m * 0) = f m * f 0
hmn : m.Coprime 0
⊢ f (m * 0) = f m * f 0
state_after: no goals
Theorem: Function.IsPeriodicPt.eq_of_apply_eq_same
File: Mathlib/Dynamics/PeriodicPts.lean

tactic: rw [← hx.eq, ← hy.eq, ← iterate_pred_comp_of_pos f hn, comp_apply, comp_apply, h]
state_before: α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hx : IsPeriodicPt f n x
hy : IsPeriodicPt f n y
hn : 0 < n
h : f x = f y
⊢ x = y
state_after: no goals
Theorem: FreeAbelianGroup.map_comp_apply
File: Mathlib/GroupTheory/FreeAbelianGroup.lean

tactic: rw [map_comp]
state_before: α : Type u
β : Type v
γ : Type w
f : α → β
g : β → γ
x : FreeAbelianGroup α
⊢ (map (g ∘ f)) x = (map g) ((map f) x)
state_after: α : Type u
β : Type v
γ : Type w
f : α → β
g : β → γ
x : FreeAbelianGroup α
⊢ ((map g).comp (map f)) x = (map g) ((map f) x)

tactic: rfl
state_before: α : Type u
β : Type v
γ : Type w
f : α → β
g : β → γ
x : FreeAbelianGroup α
⊢ ((map g).comp (map f)) x = (map g) ((map f) x)
state_after: no goals
Theorem: Cardinal.natCast_eq_toPartENat_iff
File: Mathlib/SetTheory/Cardinal/Finite.lean

tactic: rw [le_antisymm_iff, le_antisymm_iff, Cardinal.toPartENat_le_natCast_iff,
  Cardinal.natCast_le_toPartENat_iff]
state_before: α : Type u_1
β : Type u_2
n : ℕ
c : Cardinal.{u_3}
⊢ ↑n = toPartENat c ↔ ↑n = c
state_after: no goals
Theorem: Ordinal.IsFundamentalSequence.ord_cof
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

tactic: rw [hf.cof_eq]
state_before: α : Type u_1
r : α → α → Prop
a o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hf : a.IsFundamentalSequence o f
i : Ordinal.{u}
hi : i < a.cof.ord
⊢ a.cof.ord ≤ o
state_after: no goals

tactic: have H := hf.cof_eq
state_before: α : Type u_1
r : α → α → Prop
a o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hf : a.IsFundamentalSequence o f
⊢ a.IsFundamentalSequence a.cof.ord fun i hi => f i ⋯
state_after: α : Type u_1
r : α → α → Prop
a o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hf : a.IsFundamentalSequence o f
H : a.cof.ord = o
⊢ a.IsFundamentalSequence a.cof.ord fun i hi => f i ⋯

tactic: subst H
state_before: α : Type u_1
r : α → α → Prop
a o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hf : a.IsFundamentalSequence o f
H : a.cof.ord = o
⊢ a.IsFundamentalSequence a.cof.ord fun i hi => f i ⋯
state_after: α : Type u_1
r : α → α → Prop
a : Ordinal.{u}
f : (b : Ordinal.{u}) → b < a.cof.ord → Ordinal.{u}
hf : a.IsFundamentalSequence a.cof.ord f
⊢ a.IsFundamentalSequence a.cof.ord fun i hi => f i ⋯

tactic: exact hf
state_before: α : Type u_1
r : α → α → Prop
a : Ordinal.{u}
f : (b : Ordinal.{u}) → b < a.cof.ord → Ordinal.{u}
hf : a.IsFundamentalSequence a.cof.ord f
⊢ a.IsFundamentalSequence a.cof.ord fun i hi => f i ⋯
state_after: no goals
Theorem: EMetric.diam_image_le_iff
File: Mathlib/Topology/EMetricSpace/Basic.lean

tactic: simp only [diam_le_iff, forall_mem_image]
state_before: α : Type u
β : Type v
X : Type u_1
inst✝ : PseudoEMetricSpace α
x y z : α
ε ε₁ ε₂ : ℝ≥0∞
s✝ t : Set α
d : ℝ≥0∞
f : β → α
s : Set β
⊢ diam (f '' s) ≤ d ↔ ∀ x ∈ s, ∀ y ∈ s, edist (f x) (f y) ≤ d
state_after: no goals
Theorem: Asymptotics.IsBigO.sqrt
File: Mathlib/Analysis/SpecialFunctions/Pow/Asymptotics.lean

tactic: simpa [Real.sqrt_eq_rpow] using hfg.rpow one_half_pos.le hg
state_before: α : Type u_1
r c : ℝ
l : Filter α
f g : α → ℝ
hfg : f =O[l] g
hg : 0 ≤ᶠ[l] g
⊢ (fun x => √(f x)) =O[l] fun x => √(g x)
state_after: no goals
Theorem: HasFPowerSeriesOnBall.tendstoUniformlyOn'
File: Mathlib/Analysis/Analytic/Basic.lean

tactic: convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f g : E → F
p pf pg : FormalMultilinearSeries 𝕜 E F
x : E
r r'✝ : ℝ≥0∞
r' : ℝ≥0
hf : HasFPowerSeriesOnBall f p x r
h : ↑r' < r
⊢ TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball x ↑r')
state_after: case h.e'_6
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f g : E → F
p pf pg : FormalMultilinearSeries 𝕜 E F
x : E
r r'✝ : ℝ≥0∞
r' : ℝ≥0
hf : HasFPowerSeriesOnBall f p x r
h : ↑r' < r
⊢ f = (fun y => f (x + y)) ∘ fun y => y - x

case h.e'_8
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f g : E → F
p pf pg : FormalMultilinearSeries 𝕜 E F
x : E
r r'✝ : ℝ≥0∞
r' : ℝ≥0
hf : HasFPowerSeriesOnBall f p x r
h : ↑r' < r
⊢ Metric.ball x ↑r' = (fun y => y - x) ⁻¹' Metric.ball 0 ↑r'

tactic: ext z
state_before: case h.e'_8
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f g : E → F
p pf pg : FormalMultilinearSeries 𝕜 E F
x : E
r r'✝ : ℝ≥0∞
r' : ℝ≥0
hf : HasFPowerSeriesOnBall f p x r
h : ↑r' < r
⊢ Metric.ball x ↑r' = (fun y => y - x) ⁻¹' Metric.ball 0 ↑r'
state_after: case h.e'_8.h
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f g : E → F
p pf pg : FormalMultilinearSeries 𝕜 E F
x : E
r r'✝ : ℝ≥0∞
r' : ℝ≥0
hf : HasFPowerSeriesOnBall f p x r
h : ↑r' < r
z : E
⊢ z ∈ Metric.ball x ↑r' ↔ z ∈ (fun y => y - x) ⁻¹' Metric.ball 0 ↑r'

tactic: simp [dist_eq_norm]
state_before: case h.e'_8.h
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f g : E → F
p pf pg : FormalMultilinearSeries 𝕜 E F
x : E
r r'✝ : ℝ≥0∞
r' : ℝ≥0
hf : HasFPowerSeriesOnBall f p x r
h : ↑r' < r
z : E
⊢ z ∈ Metric.ball x ↑r' ↔ z ∈ (fun y => y - x) ⁻¹' Metric.ball 0 ↑r'
state_after: no goals
Theorem: AbstractCompletion.extend_coe
File: Mathlib/Topology/UniformSpace/AbstractCompletion.lean

tactic: rw [pkg.extend_def hf]
state_before: α : Type u_1
inst✝² : UniformSpace α
pkg : AbstractCompletion α
β : Type u_2
inst✝¹ : UniformSpace β
f : α → β
inst✝ : T2Space β
hf : UniformContinuous f
a : α
⊢ pkg.extend f (pkg.coe a) = f a
state_after: α : Type u_1
inst✝² : UniformSpace α
pkg : AbstractCompletion α
β : Type u_2
inst✝¹ : UniformSpace β
f : α → β
inst✝ : T2Space β
hf : UniformContinuous f
a : α
⊢ ⋯.extend f (pkg.coe a) = f a

tactic: exact pkg.denseInducing.extend_eq hf.continuous a
state_before: α : Type u_1
inst✝² : UniformSpace α
pkg : AbstractCompletion α
β : Type u_2
inst✝¹ : UniformSpace β
f : α → β
inst✝ : T2Space β
hf : UniformContinuous f
a : α
⊢ ⋯.extend f (pkg.coe a) = f a
state_after: no goals
Theorem: Prefunctor.IsCovering.symmetrify
File: Mathlib/Combinatorics/Quiver/Covering.lean

tactic: refine ⟨fun u => ?_, fun u => ?_⟩ <;>
  simp only [φ.symmetrifyStar, φ.symmetrifyCostar] <;>
  erw [EquivLike.comp_bijective, EquivLike.bijective_comp] <;>
  simp [hφ.star_bijective u, hφ.costar_bijective u]
state_before: U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.10377
inst✝ : Quiver W
ψ : V ⥤q W
hφ : φ.IsCovering
⊢ φ.symmetrify.IsCovering
state_after: no goals