1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Homeomorph.symm_map_nhds_eq
File: Mathlib/Topology/Homeomorph.lean

tactic: rw [h.symm.map_nhds_eq, h.symm_apply_apply]
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝⁴ : TopologicalSpace X
inst✝³ : TopologicalSpace Y
inst✝² : TopologicalSpace Z
X' : Type u_4
Y' : Type u_5
inst✝¹ : TopologicalSpace X'
inst✝ : TopologicalSpace Y'
h : X ≃ₜ Y
x : X
⊢ map (⇑h.symm) (𝓝 (h x)) = 𝓝 x
state_after: no goals
Theorem: Continuous.continuous_symm_of_equiv_compact_to_t2
File: Mathlib/Topology/Homeomorph.lean

tactic: rw [continuous_iff_isClosed]
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : CompactSpace X
inst✝ : T2Space Y
f : X ≃ Y
hf : Continuous ⇑f
⊢ Continuous ⇑f.symm
state_after: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : CompactSpace X
inst✝ : T2Space Y
f : X ≃ Y
hf : Continuous ⇑f
⊢ ∀ (s : Set X), IsClosed s → IsClosed (⇑f.symm ⁻¹' s)

tactic: intro C hC
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : CompactSpace X
inst✝ : T2Space Y
f : X ≃ Y
hf : Continuous ⇑f
⊢ ∀ (s : Set X), IsClosed s → IsClosed (⇑f.symm ⁻¹' s)
state_after: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : CompactSpace X
inst✝ : T2Space Y
f : X ≃ Y
hf : Continuous ⇑f
C : Set X
hC : IsClosed C
⊢ IsClosed (⇑f.symm ⁻¹' C)

tactic: have hC' : IsClosed (f '' C) := (hC.isCompact.image hf).isClosed
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : CompactSpace X
inst✝ : T2Space Y
f : X ≃ Y
hf : Continuous ⇑f
C : Set X
hC : IsClosed C
⊢ IsClosed (⇑f.symm ⁻¹' C)
state_after: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : CompactSpace X
inst✝ : T2Space Y
f : X ≃ Y
hf : Continuous ⇑f
C : Set X
hC : IsClosed C
hC' : IsClosed (⇑f '' C)
⊢ IsClosed (⇑f.symm ⁻¹' C)

tactic: rwa [Equiv.image_eq_preimage] at hC'
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : CompactSpace X
inst✝ : T2Space Y
f : X ≃ Y
hf : Continuous ⇑f
C : Set X
hC : IsClosed C
hC' : IsClosed (⇑f '' C)
⊢ IsClosed (⇑f.symm ⁻¹' C)
state_after: no goals
Theorem: groupCohomology.mem_twoCocycles_iff
File: Mathlib/RepresentationTheory/GroupCohomology/LowDegree.lean

tactic: simp_rw [mem_twoCocycles_def, sub_eq_zero, sub_add_eq_add_sub, sub_eq_iff_eq_add, eq_comm,
  add_comm (f (_ * _, _))]
state_before: k G : Type u
inst✝¹ : CommRing k
inst✝ : Group G
A : Rep k G
f : G × G → CoeSort.coe A
⊢ f ∈ twoCocycles A ↔ ∀ (g h j : G), f (g * h, j) + f (g, h) = (A.ρ g) (f (h, j)) + f (g, h * j)
state_after: no goals
Theorem: div_le_of_nonneg_of_le_mul
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: rcases eq_or_lt_of_le hb with (rfl | hb')
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
hb : 0 ≤ b
hc : 0 ≤ c
h : a ≤ c * b
⊢ a / b ≤ c
state_after: case inl
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a c d e : α
m n : ℤ
hc : 0 ≤ c
hb : 0 ≤ 0
h : a ≤ c * 0
⊢ a / 0 ≤ c

case inr
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
hb : 0 ≤ b
hc : 0 ≤ c
h : a ≤ c * b
hb' : 0 < b
⊢ a / b ≤ c

tactic: simp only [div_zero, hc]
state_before: case inl
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a c d e : α
m n : ℤ
hc : 0 ≤ c
hb : 0 ≤ 0
h : a ≤ c * 0
⊢ a / 0 ≤ c
state_after: no goals

tactic: rwa [div_le_iff hb']
state_before: case inr
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
hb : 0 ≤ b
hc : 0 ≤ c
h : a ≤ c * b
hb' : 0 < b
⊢ a / b ≤ c
state_after: no goals
Theorem: Finpartition.coe_energy
File: Mathlib/Combinatorics/SimpleGraph/Regularity/Energy.lean

tactic: rw [energy]
state_before: α : Type u_1
inst✝² : DecidableEq α
s : Finset α
P : Finpartition s
G : SimpleGraph α
inst✝¹ : DecidableRel G.Adj
𝕜 : Type u_2
inst✝ : LinearOrderedField 𝕜
⊢ ↑(P.energy G) = (∑ uv ∈ P.parts.offDiag, ↑(G.edgeDensity uv.1 uv.2) ^ 2) / ↑P.parts.card ^ 2
state_after: α : Type u_1
inst✝² : DecidableEq α
s : Finset α
P : Finpartition s
G : SimpleGraph α
inst✝¹ : DecidableRel G.Adj
𝕜 : Type u_2
inst✝ : LinearOrderedField 𝕜
⊢ ↑((∑ uv ∈ P.parts.offDiag, G.edgeDensity uv.1 uv.2 ^ 2) / ↑P.parts.card ^ 2) =
    (∑ uv ∈ P.parts.offDiag, ↑(G.edgeDensity uv.1 uv.2) ^ 2) / ↑P.parts.card ^ 2

tactic: norm_cast
state_before: α : Type u_1
inst✝² : DecidableEq α
s : Finset α
P : Finpartition s
G : SimpleGraph α
inst✝¹ : DecidableRel G.Adj
𝕜 : Type u_2
inst✝ : LinearOrderedField 𝕜
⊢ ↑((∑ uv ∈ P.parts.offDiag, G.edgeDensity uv.1 uv.2 ^ 2) / ↑P.parts.card ^ 2) =
    (∑ uv ∈ P.parts.offDiag, ↑(G.edgeDensity uv.1 uv.2) ^ 2) / ↑P.parts.card ^ 2
state_after: no goals
Theorem: Finset.card_filter
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

tactic: simp [sum_ite]
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f g : α → β
p : α → Prop
inst✝ : DecidablePred p
s : Finset α
⊢ (filter p s).card = ∑ a ∈ s, if p a then 1 else 0
state_after: no goals
Theorem: Primrec.fin_succ
File: Mathlib/Computability/Primrec.lean

tactic: simp [succ.comp fin_val]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
σ : Type u_4
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
n : ℕ
⊢ Primrec fun a => ↑a.succ
state_after: no goals
Theorem: inv_mul_le_iff'
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: rw [inv_mul_le_iff h, mul_comm]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
h : 0 < b
⊢ b⁻¹ * a ≤ c ↔ a ≤ c * b
state_after: no goals
Theorem: finAddFlip_apply_castAdd
File: Mathlib/Logic/Equiv/Fin.lean

tactic: simp [finAddFlip]
state_before: m n✝ : ℕ
k : Fin m
n : ℕ
⊢ finAddFlip (Fin.castAdd n k) = Fin.natAdd n k
state_after: no goals
Theorem: WeierstrassCurve.Affine.degree_polynomial
File: Mathlib/AlgebraicGeometry/EllipticCurve/Affine.lean

tactic: rw [polynomial_eq]
state_before: R : Type u
inst✝¹ : CommRing R
W : Affine R
inst✝ : Nontrivial R
⊢ W.polynomial.degree = 2
state_after: R : Type u
inst✝¹ : CommRing R
W : Affine R
inst✝ : Nontrivial R
⊢ { a := 0, b := 1, c := { a := 0, b := 0, c := W.a₁, d := W.a₃ }.toPoly,
          d := { a := -1, b := -W.a₂, c := -W.a₄, d := -W.a₆ }.toPoly }.toPoly.degree =
    2

tactic: exact Cubic.degree_of_b_ne_zero' one_ne_zero
state_before: R : Type u
inst✝¹ : CommRing R
W : Affine R
inst✝ : Nontrivial R
⊢ { a := 0, b := 1, c := { a := 0, b := 0, c := W.a₁, d := W.a₃ }.toPoly,
          d := { a := -1, b := -W.a₂, c := -W.a₄, d := -W.a₆ }.toPoly }.toPoly.degree =
    2
state_after: no goals
Theorem: Complex.conj_cpow_eq_ite
File: Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean

tactic: simp_rw [cpow_def, map_eq_zero, apply_ite conj, map_one, map_zero, ← exp_conj, map_mul, conj_conj,
  log_conj_eq_ite]
state_before: x n : ℂ
⊢ (starRingEnd ℂ) x ^ n = if x.arg = π then x ^ n else (starRingEnd ℂ) (x ^ (starRingEnd ℂ) n)
state_after: x n : ℂ
⊢ (if x = 0 then if n = 0 then 1 else 0 else cexp ((if x.arg = π then log x else (starRingEnd ℂ) (log x)) * n)) =
    if x.arg = π then if x = 0 then if n = 0 then 1 else 0 else cexp (log x * n)
    else if x = 0 then if n = 0 then 1 else 0 else cexp ((starRingEnd ℂ) (log x) * n)

tactic: split_ifs with hcx hn hx <;> rfl
state_before: x n : ℂ
⊢ (if x = 0 then if n = 0 then 1 else 0 else cexp ((if x.arg = π then log x else (starRingEnd ℂ) (log x)) * n)) =
    if x.arg = π then if x = 0 then if n = 0 then 1 else 0 else cexp (log x * n)
    else if x = 0 then if n = 0 then 1 else 0 else cexp ((starRingEnd ℂ) (log x) * n)
state_after: no goals
Theorem: LiouvilleWith.mul_int_iff
File: Mathlib/NumberTheory/Liouville/LiouvilleWith.lean

tactic: rw [← Rat.cast_intCast, mul_rat_iff (Int.cast_ne_zero.2 hm)]
state_before: p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
hm : m ≠ 0
⊢ LiouvilleWith p (x * ↑m) ↔ LiouvilleWith p x
state_after: no goals
Theorem: MeasureTheory.ProbabilityMeasure.ennreal_coeFn_eq_coeFn_toMeasure
File: Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean

tactic: rw [← coeFn_comp_toFiniteMeasure_eq_coeFn, FiniteMeasure.ennreal_coeFn_eq_coeFn_toMeasure,
  toMeasure_comp_toFiniteMeasure_eq_toMeasure]
state_before: Ω : Type u_1
inst✝ : MeasurableSpace Ω
ν : ProbabilityMeasure Ω
s : Set Ω
⊢ ↑(ν s) = ↑ν s
state_after: no goals
Theorem: cexp_neg_quadratic_isLittleO_rpow_atTop
File: Mathlib/Analysis/SpecialFunctions/Gaussian/PoissonSummation.lean

tactic: apply Asymptotics.IsLittleO.of_norm_left
state_before: E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : a.re < 0
b : ℂ
s : ℝ
⊢ (fun x => cexp (a * ↑x ^ 2 + b * ↑x)) =o[atTop] fun x => x ^ s
state_after: case a
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : a.re < 0
b : ℂ
s : ℝ
⊢ (fun x => ‖cexp (a * ↑x ^ 2 + b * ↑x)‖) =o[atTop] fun x => x ^ s

tactic: convert rexp_neg_quadratic_isLittleO_rpow_atTop ha b.re s with x
state_before: case a
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : a.re < 0
b : ℂ
s : ℝ
⊢ (fun x => ‖cexp (a * ↑x ^ 2 + b * ↑x)‖) =o[atTop] fun x => x ^ s
state_after: case h.e'_7.h
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : a.re < 0
b : ℂ
s x : ℝ
⊢ ‖cexp (a * ↑x ^ 2 + b * ↑x)‖ = rexp (a.re * x ^ 2 + b.re * x)

tactic: simp_rw [Complex.norm_eq_abs, Complex.abs_exp, add_re, ← ofReal_pow, mul_comm (_ : ℂ) ↑(_ : ℝ),
    re_ofReal_mul, mul_comm _ (re _)]
state_before: case h.e'_7.h
E : Type u_1
inst✝ : NormedAddCommGroup E
a : ℂ
ha : a.re < 0
b : ℂ
s x : ℝ
⊢ ‖cexp (a * ↑x ^ 2 + b * ↑x)‖ = rexp (a.re * x ^ 2 + b.re * x)
state_after: no goals
Theorem: CategoryTheory.Limits.BinaryFan.isLimit_iff_isIso_fst
File: Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean

tactic: constructor
state_before: C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsTerminal Y
c : BinaryFan X Y
⊢ Nonempty (IsLimit c) ↔ IsIso c.fst
state_after: case mp
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsTerminal Y
c : BinaryFan X Y
⊢ Nonempty (IsLimit c) → IsIso c.fst

case mpr
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsTerminal Y
c : BinaryFan X Y
⊢ IsIso c.fst → Nonempty (IsLimit c)

tactic: rintro ⟨H⟩
state_before: case mp
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsTerminal Y
c : BinaryFan X Y
⊢ Nonempty (IsLimit c) → IsIso c.fst
state_after: case mp.intro
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsTerminal Y
c : BinaryFan X Y
H : IsLimit c
⊢ IsIso c.fst

tactic: obtain ⟨l, hl, -⟩ := BinaryFan.IsLimit.lift' H (𝟙 X) (h.from X)
state_before: case mp.intro
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsTerminal Y
c : BinaryFan X Y
H : IsLimit c
⊢ IsIso c.fst
state_after: case mp.intro.mk.intro
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsTerminal Y
c : BinaryFan X Y
H : IsLimit c
l : X ⟶ c.pt
hl : l ≫ c.fst = 𝟙 X
⊢ IsIso c.fst

tactic: exact
  ⟨⟨l,
      BinaryFan.IsLimit.hom_ext H (by simpa [hl, -Category.comp_id] using Category.comp_id _)
        (h.hom_ext _ _),
      hl⟩⟩
state_before: case mp.intro.mk.intro
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsTerminal Y
c : BinaryFan X Y
H : IsLimit c
l : X ⟶ c.pt
hl : l ≫ c.fst = 𝟙 X
⊢ IsIso c.fst
state_after: no goals

tactic: simpa [hl, -Category.comp_id] using Category.comp_id _
state_before: C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsTerminal Y
c : BinaryFan X Y
H : IsLimit c
l : X ⟶ c.pt
hl : l ≫ c.fst = 𝟙 X
⊢ (c.fst ≫ l) ≫ c.fst = 𝟙 (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }) ≫ c.fst
state_after: no goals

tactic: intro
state_before: case mpr
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsTerminal Y
c : BinaryFan X Y
⊢ IsIso c.fst → Nonempty (IsLimit c)
state_after: case mpr
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsTerminal Y
c : BinaryFan X Y
a✝ : IsIso c.fst
⊢ Nonempty (IsLimit c)

tactic: exact
  ⟨BinaryFan.IsLimit.mk _ (fun f _ => f ≫ inv c.fst) (fun _ _ => by simp)
      (fun _ _ => h.hom_ext _ _) fun _ _ _ e _ => by simp [← e]⟩
state_before: case mpr
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsTerminal Y
c : BinaryFan X Y
a✝ : IsIso c.fst
⊢ Nonempty (IsLimit c)
state_after: no goals

tactic: simp
state_before: C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsTerminal Y
c : BinaryFan X Y
a✝ : IsIso c.fst
T✝ : C
x✝¹ : T✝ ⟶ X
x✝ : T✝ ⟶ Y
⊢ (fun {T} f x => f ≫ inv c.fst) x✝¹ x✝ ≫ c.fst = x✝¹
state_after: no goals

tactic: simp [← e]
state_before: C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsTerminal Y
c : BinaryFan X Y
a✝ : IsIso c.fst
T✝ : C
x✝³ : T✝ ⟶ X
x✝² : T✝ ⟶ Y
x✝¹ : T✝ ⟶ c.pt
e : x✝¹ ≫ c.fst = x✝³
x✝ : x✝¹ ≫ c.snd = x✝²
⊢ x✝¹ = (fun {T} f x => f ≫ inv c.fst) x✝³ x✝²
state_after: no goals
Theorem: Matrix.fromBlocks_submatrix_sum_swap_left
File: Mathlib/Data/Matrix/Block.lean

tactic: ext i j
state_before: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
p : Type u_5
q : Type u_6
m' : o → Type u_7
n' : o → Type u_8
p' : o → Type u_9
R : Type u_10
S : Type u_11
α : Type u_12
β : Type u_13
A : Matrix n l α
B : Matrix n m α
C : Matrix o l α
D : Matrix o m α
f : p → l ⊕ m
⊢ (fromBlocks A B C D).submatrix Sum.swap f = (fromBlocks C D A B).submatrix id f
state_after: case a
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
p : Type u_5
q : Type u_6
m' : o → Type u_7
n' : o → Type u_8
p' : o → Type u_9
R : Type u_10
S : Type u_11
α : Type u_12
β : Type u_13
A : Matrix n l α
B : Matrix n m α
C : Matrix o l α
D : Matrix o m α
f : p → l ⊕ m
i : o ⊕ n
j : p
⊢ (fromBlocks A B C D).submatrix Sum.swap f i j = (fromBlocks C D A B).submatrix id f i j

tactic: cases i <;> dsimp <;> cases f j <;> rfl
state_before: case a
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
p : Type u_5
q : Type u_6
m' : o → Type u_7
n' : o → Type u_8
p' : o → Type u_9
R : Type u_10
S : Type u_11
α : Type u_12
β : Type u_13
A : Matrix n l α
B : Matrix n m α
C : Matrix o l α
D : Matrix o m α
f : p → l ⊕ m
i : o ⊕ n
j : p
⊢ (fromBlocks A B C D).submatrix Sum.swap f i j = (fromBlocks C D A B).submatrix id f i j
state_after: no goals
Theorem: RatFunc.num_div'
File: Mathlib/FieldTheory/RatFunc/Basic.lean

tactic: rw [num, numDenom_div _ hq]
state_before: K : Type u
inst✝ : Field K
p q : K[X]
hq : q ≠ 0
⊢ ((algebraMap K[X] (RatFunc K)) p / (algebraMap K[X] (RatFunc K)) q).num =
    C (q / gcd p q).leadingCoeff⁻¹ * (p / gcd p q)
state_after: no goals
Theorem: Primrec.decode₂
File: Mathlib/Computability/Primrec.lean

tactic: exact encode_iff.mpr snd
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
σ : Type u_5
inst✝⁴ : Primcodable α
inst✝³ : Primcodable β
inst✝² : Primcodable γ
inst✝¹ : Primcodable δ
inst✝ : Primcodable σ
⊢ Primrec₂ fun p => encode
state_after: no goals

tactic: exact fst.comp fst
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
σ : Type u_5
inst✝⁴ : Primcodable α
inst✝³ : Primcodable β
inst✝² : Primcodable γ
inst✝¹ : Primcodable δ
inst✝ : Primcodable σ
⊢ Primrec₂ fun p a => p.1
state_after: no goals
Theorem: Polynomial.linearIndependent_powers_iff_aeval
File: Mathlib/RingTheory/Polynomial/Basic.lean

tactic: rw [linearIndependent_iff]
state_before: R : Type u
S : Type u_1
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
f : M →ₗ[R] M
v : M
⊢ (LinearIndependent R fun n => (f ^ n) v) ↔ ∀ (p : R[X]), ((aeval f) p) v = 0 → p = 0
state_after: R : Type u
S : Type u_1
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
f : M →ₗ[R] M
v : M
⊢ (∀ (l : ℕ →₀ R), (Finsupp.total ℕ M R fun n => (f ^ n) v) l = 0 → l = 0) ↔ ∀ (p : R[X]), ((aeval f) p) v = 0 → p = 0

tactic: simp only [Finsupp.total_apply, aeval_endomorphism, forall_iff_forall_finsupp, Sum, support,
  coeff, ofFinsupp_eq_zero]
state_before: R : Type u
S : Type u_1
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
f : M →ₗ[R] M
v : M
⊢ (∀ (l : ℕ →₀ R), (Finsupp.total ℕ M R fun n => (f ^ n) v) l = 0 → l = 0) ↔ ∀ (p : R[X]), ((aeval f) p) v = 0 → p = 0
state_after: R : Type u
S : Type u_1
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
f : M →ₗ[R] M
v : M
⊢ (∀ (l : ℕ →₀ R), (l.sum fun i a => a • (f ^ i) v) = 0 → l = 0) ↔
    ∀ (q : AddMonoidAlgebra R ℕ), ({ toFinsupp := q }.sum fun n b => b • (f ^ n) v) = 0 → q = 0

tactic: exact Iff.rfl
state_before: R : Type u
S : Type u_1
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
f : M →ₗ[R] M
v : M
⊢ (∀ (l : ℕ →₀ R), (l.sum fun i a => a • (f ^ i) v) = 0 → l = 0) ↔
    ∀ (q : AddMonoidAlgebra R ℕ), ({ toFinsupp := q }.sum fun n b => b • (f ^ n) v) = 0 → q = 0
state_after: no goals
Theorem: Polynomial.map_surjective
File: Mathlib/Algebra/Polynomial/Eval.lean

tactic: rw [Polynomial.map_add f, hp', hq']
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝¹ : Semiring R
p✝¹ q✝ r : R[X]
inst✝ : Semiring S
f : R →+* S
hf : Function.Surjective ⇑f
p✝ p q : S[X]
hp : ∃ a, map f a = p
hq : ∃ a, map f a = q
p' : R[X]
hp' : map f p' = p
q' : R[X]
hq' : map f q' = q
⊢ map f (p' + q') = p + q
state_after: no goals

tactic: rw [map_monomial f, hr]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n✝ : ℕ
inst✝¹ : Semiring R
p✝ q r✝ : R[X]
inst✝ : Semiring S
f : R →+* S
hf : Function.Surjective ⇑f
p : S[X]
n : ℕ
s : S
r : R
hr : f r = s
⊢ map f ((monomial n) r) = (monomial n) s
state_after: no goals
Theorem: CategoryTheory.Limits.imageSubobjectMap_arrow
File: Mathlib/CategoryTheory/Subobject/Limits.lean

tactic: simp only [imageSubobjectMap, Category.assoc, imageSubobject_arrow']
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
inst✝³ : HasImage f✝
W X Y Z : C
f : W ⟶ X
inst✝² : HasImage f
g : Y ⟶ Z
inst✝¹ : HasImage g
sq : Arrow.mk f ⟶ Arrow.mk g
inst✝ : HasImageMap sq
⊢ imageSubobjectMap sq ≫ (imageSubobject g).arrow = (imageSubobject f).arrow ≫ sq.right
state_after: C : Type u
inst✝⁴ : Category.{v, u} C
X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
inst✝³ : HasImage f✝
W X Y Z : C
f : W ⟶ X
inst✝² : HasImage f
g : Y ⟶ Z
inst✝¹ : HasImage g
sq : Arrow.mk f ⟶ Arrow.mk g
inst✝ : HasImageMap sq
⊢ (imageSubobjectIso f).hom ≫ image.map sq ≫ image.ι g = (imageSubobject f).arrow ≫ sq.right

tactic: erw [image.map_ι, ← Category.assoc, imageSubobject_arrow]
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
inst✝³ : HasImage f✝
W X Y Z : C
f : W ⟶ X
inst✝² : HasImage f
g : Y ⟶ Z
inst✝¹ : HasImage g
sq : Arrow.mk f ⟶ Arrow.mk g
inst✝ : HasImageMap sq
⊢ (imageSubobjectIso f).hom ≫ image.map sq ≫ image.ι g = (imageSubobject f).arrow ≫ sq.right
state_after: no goals
Theorem: Ordnode.any_singleton
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: rintro (⟨⟨⟩⟩ | h | ⟨⟨⟩⟩)
state_before: α : Type u_1
P : α → Prop
x : α
⊢ Any P {x} → P x
state_after: case inr.inl
α : Type u_1
P : α → Prop
x : α
h : P x
⊢ P x

tactic: exact h
state_before: case inr.inl
α : Type u_1
P : α → Prop
x : α
h : P x
⊢ P x
state_after: no goals
Theorem: PSet.func_mem
File: Mathlib/SetTheory/ZFC/Basic.lean

tactic: cases x
state_before: x : PSet
i : x.Type
⊢ x.Func i ∈ x
state_after: case mk
α✝ : Type u_1
A✝ : α✝ → PSet
i : (mk α✝ A✝).Type
⊢ (mk α✝ A✝).Func i ∈ mk α✝ A✝

tactic: apply Mem.mk
state_before: case mk
α✝ : Type u_1
A✝ : α✝ → PSet
i : (mk α✝ A✝).Type
⊢ (mk α✝ A✝).Func i ∈ mk α✝ A✝
state_after: no goals
Theorem: Stream'.WSeq.get?_terminates_le
File: Mathlib/Data/Seq/WSeq.lean

tactic: induction' h with m' _ IH
state_before: α : Type u
β : Type v
γ : Type w
s : WSeq α
m n : ℕ
h : m ≤ n
⊢ (s.get? n).Terminates → (s.get? m).Terminates
state_after: case refl
α : Type u
β : Type v
γ : Type w
s : WSeq α
m n : ℕ
⊢ (s.get? m).Terminates → (s.get? m).Terminates

case step
α : Type u
β : Type v
γ : Type w
s : WSeq α
m n m' : ℕ
a✝ : m.le m'
IH : (s.get? m').Terminates → (s.get? m).Terminates
⊢ (s.get? m'.succ).Terminates → (s.get? m).Terminates

tactic: exacts [id, fun T => IH (@head_terminates_of_head_tail_terminates _ _ T)]
state_before: case refl
α : Type u
β : Type v
γ : Type w
s : WSeq α
m n : ℕ
⊢ (s.get? m).Terminates → (s.get? m).Terminates

case step
α : Type u
β : Type v
γ : Type w
s : WSeq α
m n m' : ℕ
a✝ : m.le m'
IH : (s.get? m').Terminates → (s.get? m).Terminates
⊢ (s.get? m'.succ).Terminates → (s.get? m).Terminates
state_after: no goals
Theorem: Even.neg_one_zpow
File: Mathlib/Algebra/Ring/Parity.lean

tactic: rw [h.neg_zpow, one_zpow]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
inst✝¹ : DivisionMonoid α
inst✝ : HasDistribNeg α
a : α
n : ℤ
h : Even n
⊢ (-1) ^ n = 1
state_after: no goals
Theorem: CompleteSublattice.coe_sInf'
File: Mathlib/Order/CompleteSublattice.lean

tactic: rw [coe_sInf, ← Set.image, sInf_image]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : CompleteLattice α
inst✝ : CompleteLattice β
f : CompleteLatticeHom α β
L : CompleteSublattice α
S : Set ↥L
⊢ ↑(sInf S) = ⨅ N ∈ S, ↑N
state_after: no goals
Theorem: Int.mod_coprime
File: Mathlib/Data/Int/ModEq.lean

tactic: rw [← Nat.gcd_eq_gcd_ab, hgcd]
state_before: m n a✝ b✝ c d : ℤ
a b : ℕ
hab : a.Coprime b
hgcd : a.gcd b = 1
⊢ ↑a * a.gcdA b + ↑b * a.gcdB b ≡ 1 [ZMOD ↑b]
state_after: m n a✝ b✝ c d : ℤ
a b : ℕ
hab : a.Coprime b
hgcd : a.gcd b = 1
⊢ ↑1 ≡ 1 [ZMOD ↑b]

tactic: rfl
state_before: m n a✝ b✝ c d : ℤ
a b : ℕ
hab : a.Coprime b
hgcd : a.gcd b = 1
⊢ ↑1 ≡ 1 [ZMOD ↑b]
state_after: no goals