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

tactic: rw [smul_eq_C_mul, roots_C_mul _ ha]
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]
ha : a ≠ 0
⊢ (a • p).roots = p.roots
state_after: no goals
Theorem: IsUnifLocDoublingMeasure.eventually_measure_le_scaling_constant_mul'
File: Mathlib/MeasureTheory/Measure/Doubling.lean

tactic: convert eventually_nhdsWithin_pos_mul_left hK (eventually_measure_le_scaling_constant_mul μ K⁻¹)
state_before: α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
hK : 0 < K
⊢ ∀ᶠ (r : ℝ) in 𝓝[>] 0, ∀ (x : α), μ (closedBall x r) ≤ ↑(scalingConstantOf μ K⁻¹) * μ (closedBall x (K * r))
state_after: case h.e'_2.h.h.h.e'_3.h.e'_6.h.e'_4
α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
hK : 0 < K
x✝ : ℝ
a✝ : α
⊢ x✝ = K⁻¹ * (K * x✝)

tactic: simp [inv_mul_cancel_left₀ hK.ne']
state_before: case h.e'_2.h.h.h.e'_3.h.e'_6.h.e'_4
α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
hK : 0 < K
x✝ : ℝ
a✝ : α
⊢ x✝ = K⁻¹ * (K * x✝)
state_after: no goals
Theorem: left_div_gcd_ne_zero
File: Mathlib/RingTheory/EuclideanDomain.lean

tactic: obtain ⟨r, hr⟩ := GCDMonoid.gcd_dvd_left p q
state_before: R : Type u_1
inst✝¹ : EuclideanDomain R
inst✝ : GCDMonoid R
p✝ q✝ p q : R
hp : p ≠ 0
⊢ p / GCDMonoid.gcd p q ≠ 0
state_after: case intro
R : Type u_1
inst✝¹ : EuclideanDomain R
inst✝ : GCDMonoid R
p✝ q✝ p q : R
hp : p ≠ 0
r : R
hr : p = GCDMonoid.gcd p q * r
⊢ p / GCDMonoid.gcd p q ≠ 0

tactic: obtain ⟨pq0, r0⟩ : GCDMonoid.gcd p q ≠ 0 ∧ r ≠ 0 := mul_ne_zero_iff.mp (hr ▸ hp)
state_before: case intro
R : Type u_1
inst✝¹ : EuclideanDomain R
inst✝ : GCDMonoid R
p✝ q✝ p q : R
hp : p ≠ 0
r : R
hr : p = GCDMonoid.gcd p q * r
⊢ p / GCDMonoid.gcd p q ≠ 0
state_after: case intro.intro
R : Type u_1
inst✝¹ : EuclideanDomain R
inst✝ : GCDMonoid R
p✝ q✝ p q : R
hp : p ≠ 0
r : R
hr : p = GCDMonoid.gcd p q * r
pq0 : GCDMonoid.gcd p q ≠ 0
r0 : r ≠ 0
⊢ p / GCDMonoid.gcd p q ≠ 0

tactic: nth_rw 1 [hr]
state_before: case intro.intro
R : Type u_1
inst✝¹ : EuclideanDomain R
inst✝ : GCDMonoid R
p✝ q✝ p q : R
hp : p ≠ 0
r : R
hr : p = GCDMonoid.gcd p q * r
pq0 : GCDMonoid.gcd p q ≠ 0
r0 : r ≠ 0
⊢ p / GCDMonoid.gcd p q ≠ 0
state_after: case intro.intro
R : Type u_1
inst✝¹ : EuclideanDomain R
inst✝ : GCDMonoid R
p✝ q✝ p q : R
hp : p ≠ 0
r : R
hr : p = GCDMonoid.gcd p q * r
pq0 : GCDMonoid.gcd p q ≠ 0
r0 : r ≠ 0
⊢ GCDMonoid.gcd p q * r / GCDMonoid.gcd p q ≠ 0

tactic: rw [mul_comm, mul_div_cancel_right₀ _ pq0]
state_before: case intro.intro
R : Type u_1
inst✝¹ : EuclideanDomain R
inst✝ : GCDMonoid R
p✝ q✝ p q : R
hp : p ≠ 0
r : R
hr : p = GCDMonoid.gcd p q * r
pq0 : GCDMonoid.gcd p q ≠ 0
r0 : r ≠ 0
⊢ GCDMonoid.gcd p q * r / GCDMonoid.gcd p q ≠ 0
state_after: case intro.intro
R : Type u_1
inst✝¹ : EuclideanDomain R
inst✝ : GCDMonoid R
p✝ q✝ p q : R
hp : p ≠ 0
r : R
hr : p = GCDMonoid.gcd p q * r
pq0 : GCDMonoid.gcd p q ≠ 0
r0 : r ≠ 0
⊢ r ≠ 0

tactic: exact r0
state_before: case intro.intro
R : Type u_1
inst✝¹ : EuclideanDomain R
inst✝ : GCDMonoid R
p✝ q✝ p q : R
hp : p ≠ 0
r : R
hr : p = GCDMonoid.gcd p q * r
pq0 : GCDMonoid.gcd p q ≠ 0
r0 : r ≠ 0
⊢ r ≠ 0
state_after: no goals
Theorem: Equiv.Perm.IsCycleOn.countable
File: Mathlib/GroupTheory/Perm/Cycle/Basic.lean

tactic: obtain rfl | ⟨a, ha⟩ := s.eq_empty_or_nonempty
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
f g : Perm α
s t : Set α
a b x y : α
hs : f.IsCycleOn s
⊢ s.Countable
state_after: case inl
ι : Type u_1
α : Type u_2
β : Type u_3
f g : Perm α
t : Set α
a b x y : α
hs : f.IsCycleOn ∅
⊢ ∅.Countable

case inr.intro
ι : Type u_1
α : Type u_2
β : Type u_3
f g : Perm α
s t : Set α
a✝ b x y : α
hs : f.IsCycleOn s
a : α
ha : a ∈ s
⊢ s.Countable

tactic: exact Set.countable_empty
state_before: case inl
ι : Type u_1
α : Type u_2
β : Type u_3
f g : Perm α
t : Set α
a b x y : α
hs : f.IsCycleOn ∅
⊢ ∅.Countable
state_after: no goals

tactic: exact (Set.countable_range fun n : ℤ => (⇑(f ^ n) : α → α) a).mono (hs.2 ha)
state_before: case inr.intro
ι : Type u_1
α : Type u_2
β : Type u_3
f g : Perm α
s t : Set α
a✝ b x y : α
hs : f.IsCycleOn s
a : α
ha : a ∈ s
⊢ s.Countable
state_after: no goals
Theorem: CategoryTheory.Groupoid.Free.freeGroupoidFunctor_id
File: Mathlib/CategoryTheory/Groupoid/FreeGroupoid.lean

tactic: dsimp only [freeGroupoidFunctor]
state_before: V : Type u
inst✝² : Quiver V
V' : Type u'
inst✝¹ : Quiver V'
V'' : Type u''
inst✝ : Quiver V''
⊢ freeGroupoidFunctor (𝟭q V) = 𝟭 (FreeGroupoid V)
state_after: V : Type u
inst✝² : Quiver V
V' : Type u'
inst✝¹ : Quiver V'
V'' : Type u''
inst✝ : Quiver V''
⊢ lift (𝟭q V ⋙q of V) = 𝟭 (FreeGroupoid V)

tactic: symm
state_before: V : Type u
inst✝² : Quiver V
V' : Type u'
inst✝¹ : Quiver V'
V'' : Type u''
inst✝ : Quiver V''
⊢ lift (𝟭q V ⋙q of V) = 𝟭 (FreeGroupoid V)
state_after: V : Type u
inst✝² : Quiver V
V' : Type u'
inst✝¹ : Quiver V'
V'' : Type u''
inst✝ : Quiver V''
⊢ 𝟭 (FreeGroupoid V) = lift (𝟭q V ⋙q of V)

tactic: apply lift_unique
state_before: V : Type u
inst✝² : Quiver V
V' : Type u'
inst✝¹ : Quiver V'
V'' : Type u''
inst✝ : Quiver V''
⊢ 𝟭 (FreeGroupoid V) = lift (𝟭q V ⋙q of V)
state_after: case hΦ
V : Type u
inst✝² : Quiver V
V' : Type u'
inst✝¹ : Quiver V'
V'' : Type u''
inst✝ : Quiver V''
⊢ of V ⋙q (𝟭 (FreeGroupoid V)).toPrefunctor = 𝟭q V ⋙q of V

tactic: rfl
state_before: case hΦ
V : Type u
inst✝² : Quiver V
V' : Type u'
inst✝¹ : Quiver V'
V'' : Type u''
inst✝ : Quiver V''
⊢ of V ⋙q (𝟭 (FreeGroupoid V)).toPrefunctor = 𝟭q V ⋙q of V
state_after: no goals
Theorem: SetTheory.PGame.bddBelow_range_of_small
File: Mathlib/SetTheory/Game/PGame.lean

tactic: let x : PGame.{u} := ⟨PEmpty, Σ i, (f $ (equivShrink.{u} ι).symm i).RightMoves, PEmpty.elim,
  fun x ↦ moveRight _ x.2⟩
state_before: xl xr : Type u
ι : Type u_1
inst✝ : Small.{u, u_1} ι
f : ι → PGame
⊢ BddBelow (Set.range f)
state_after: xl xr : Type u
ι : Type u_1
inst✝ : Small.{u, u_1} ι
f : ι → PGame
x : PGame :=
  mk PEmpty.{u + 1} ((i : Shrink.{u, u_1} ι) × (f ((equivShrink ι).symm i)).RightMoves) PEmpty.elim fun x =>
    (f ((equivShrink ι).symm x.fst)).moveRight x.snd
⊢ BddBelow (Set.range f)

tactic: refine ⟨x, Set.forall_mem_range.2 fun i ↦ ?_⟩
state_before: xl xr : Type u
ι : Type u_1
inst✝ : Small.{u, u_1} ι
f : ι → PGame
x : PGame :=
  mk PEmpty.{u + 1} ((i : Shrink.{u, u_1} ι) × (f ((equivShrink ι).symm i)).RightMoves) PEmpty.elim fun x =>
    (f ((equivShrink ι).symm x.fst)).moveRight x.snd
⊢ BddBelow (Set.range f)
state_after: xl xr : Type u
ι : Type u_1
inst✝ : Small.{u, u_1} ι
f : ι → PGame
x : PGame :=
  mk PEmpty.{u + 1} ((i : Shrink.{u, u_1} ι) × (f ((equivShrink ι).symm i)).RightMoves) PEmpty.elim fun x =>
    (f ((equivShrink ι).symm x.fst)).moveRight x.snd
i : ι
⊢ x ≤ f i

tactic: rw [← (equivShrink ι).symm_apply_apply i, le_iff_forall_lf]
state_before: xl xr : Type u
ι : Type u_1
inst✝ : Small.{u, u_1} ι
f : ι → PGame
x : PGame :=
  mk PEmpty.{u + 1} ((i : Shrink.{u, u_1} ι) × (f ((equivShrink ι).symm i)).RightMoves) PEmpty.elim fun x =>
    (f ((equivShrink ι).symm x.fst)).moveRight x.snd
i : ι
⊢ x ≤ f i
state_after: xl xr : Type u
ι : Type u_1
inst✝ : Small.{u, u_1} ι
f : ι → PGame
x : PGame :=
  mk PEmpty.{u + 1} ((i : Shrink.{u, u_1} ι) × (f ((equivShrink ι).symm i)).RightMoves) PEmpty.elim fun x =>
    (f ((equivShrink ι).symm x.fst)).moveRight x.snd
i : ι
⊢ (∀ (i_1 : x.LeftMoves), x.moveLeft i_1 ⧏ f ((equivShrink ι).symm ((equivShrink ι) i))) ∧
    ∀ (j : (f ((equivShrink ι).symm ((equivShrink ι) i))).RightMoves),
      x ⧏ (f ((equivShrink ι).symm ((equivShrink ι) i))).moveRight j

tactic: simpa [x] using fun j ↦ @lf_moveRight x ⟨equivShrink ι i, j⟩
state_before: xl xr : Type u
ι : Type u_1
inst✝ : Small.{u, u_1} ι
f : ι → PGame
x : PGame :=
  mk PEmpty.{u + 1} ((i : Shrink.{u, u_1} ι) × (f ((equivShrink ι).symm i)).RightMoves) PEmpty.elim fun x =>
    (f ((equivShrink ι).symm x.fst)).moveRight x.snd
i : ι
⊢ (∀ (i_1 : x.LeftMoves), x.moveLeft i_1 ⧏ f ((equivShrink ι).symm ((equivShrink ι) i))) ∧
    ∀ (j : (f ((equivShrink ι).symm ((equivShrink ι) i))).RightMoves),
      x ⧏ (f ((equivShrink ι).symm ((equivShrink ι) i))).moveRight j
state_after: no goals
Theorem: SimpleGraph.boxProd_neighborSet
File: Mathlib/Combinatorics/SimpleGraph/Prod.lean

tactic: ext ⟨a', b'⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
G : SimpleGraph α
H : SimpleGraph β
x : α × β
⊢ (G □ H).neighborSet x = G.neighborSet x.1 ×ˢ {x.2} ∪ {x.1} ×ˢ H.neighborSet x.2
state_after: case h.mk
α : Type u_1
β : Type u_2
γ : Type u_3
G : SimpleGraph α
H : SimpleGraph β
x : α × β
a' : α
b' : β
⊢ (a', b') ∈ (G □ H).neighborSet x ↔ (a', b') ∈ G.neighborSet x.1 ×ˢ {x.2} ∪ {x.1} ×ˢ H.neighborSet x.2

tactic: simp only [mem_neighborSet, Set.mem_union, boxProd_adj, Set.mem_prod, Set.mem_singleton_iff]
state_before: case h.mk
α : Type u_1
β : Type u_2
γ : Type u_3
G : SimpleGraph α
H : SimpleGraph β
x : α × β
a' : α
b' : β
⊢ (a', b') ∈ (G □ H).neighborSet x ↔ (a', b') ∈ G.neighborSet x.1 ×ˢ {x.2} ∪ {x.1} ×ˢ H.neighborSet x.2
state_after: case h.mk
α : Type u_1
β : Type u_2
γ : Type u_3
G : SimpleGraph α
H : SimpleGraph β
x : α × β
a' : α
b' : β
⊢ G.Adj x.1 a' ∧ x.2 = b' ∨ H.Adj x.2 b' ∧ x.1 = a' ↔ G.Adj x.1 a' ∧ b' = x.2 ∨ a' = x.1 ∧ H.Adj x.2 b'

tactic: simp only [eq_comm, and_comm]
state_before: case h.mk
α : Type u_1
β : Type u_2
γ : Type u_3
G : SimpleGraph α
H : SimpleGraph β
x : α × β
a' : α
b' : β
⊢ G.Adj x.1 a' ∧ x.2 = b' ∨ H.Adj x.2 b' ∧ x.1 = a' ↔ G.Adj x.1 a' ∧ b' = x.2 ∨ a' = x.1 ∧ H.Adj x.2 b'
state_after: no goals
Theorem: AddCircle.addOrderOf_coe_rat
File: Mathlib/Topology/Instances/AddCircle.lean

tactic: have : (↑(q.den : ℤ) : 𝕜) ≠ 0 := by
  norm_cast
  exact q.pos.ne.symm
state_before: 𝕜 : Type u_1
B : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
p q✝ : 𝕜
hp : Fact (0 < p)
q : ℚ
⊢ addOrderOf ↑(↑q * p) = q.den
state_after: 𝕜 : Type u_1
B : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
p q✝ : 𝕜
hp : Fact (0 < p)
q : ℚ
this : ↑↑q.den ≠ 0
⊢ addOrderOf ↑(↑q * p) = q.den

tactic: rw [← q.num_divInt_den, Rat.cast_divInt_of_ne_zero _ this, Int.cast_natCast, Rat.num_divInt_den,
  addOrderOf_div_of_gcd_eq_one' q.pos q.reduced]
state_before: 𝕜 : Type u_1
B : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
p q✝ : 𝕜
hp : Fact (0 < p)
q : ℚ
this : ↑↑q.den ≠ 0
⊢ addOrderOf ↑(↑q * p) = q.den
state_after: no goals

tactic: norm_cast
state_before: 𝕜 : Type u_1
B : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
p q✝ : 𝕜
hp : Fact (0 < p)
q : ℚ
⊢ ↑↑q.den ≠ 0
state_after: 𝕜 : Type u_1
B : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
p q✝ : 𝕜
hp : Fact (0 < p)
q : ℚ
⊢ ¬q.den = 0

tactic: exact q.pos.ne.symm
state_before: 𝕜 : Type u_1
B : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
p q✝ : 𝕜
hp : Fact (0 < p)
q : ℚ
⊢ ¬q.den = 0
state_after: no goals
Theorem: Multiset.Nodup.le_dedup_iff_le
File: Mathlib/Data/Multiset/Dedup.lean

tactic: simp [le_dedup, hno]
state_before: α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
s t : Multiset α
hno : s.Nodup
⊢ s ≤ t.dedup ↔ s ≤ t
state_after: no goals
Theorem: SimpleGraph.chromaticNumber_eq_card_iff_forall_surjective
File: Mathlib/Combinatorics/SimpleGraph/Coloring.lean

tactic: rw [← hG.chromaticNumber_le.ge_iff_eq, card_le_chromaticNumber_iff_forall_surjective]
state_before: V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
inst✝ : Fintype α
hG : G.Colorable (card α)
⊢ G.chromaticNumber = ↑(card α) ↔ ∀ (C : G.Coloring α), Surjective ⇑C
state_after: no goals
Theorem: Int.even_iff
File: Mathlib/Algebra/Group/Int.lean

tactic: simp [← Int.two_mul, hm]
state_before: u v m✝ n : ℤ
x✝ : Even n
m : ℤ
hm : n = m + m
⊢ n % 2 = 0
state_after: no goals

tactic: simp [← Int.two_mul, h]
state_before: u v m n : ℤ
h : n % 2 = 0
⊢ n % 2 + 2 * (n / 2) = n / 2 + n / 2
state_after: no goals
Theorem: isClosed_setOf_map_smul
File: Mathlib/Topology/Algebra/ConstMulAction.lean

tactic: simp only [Set.setOf_forall]
state_before: M : Type u_1
α✝ : Type u_2
β✝ : Type u_3
inst✝⁹ : TopologicalSpace α✝
inst✝⁸ : Monoid M
inst✝⁷ : MulAction M α✝
inst✝⁶ : ContinuousConstSMul M α✝
N : Type u_4
inst✝⁵ : Monoid N
α : Type u_5
β : Type u_6
inst✝⁴ : MulAction M α
inst✝³ : MulAction N β
inst✝² : TopologicalSpace β
inst✝¹ : T2Space β
inst✝ : ContinuousConstSMul N β
σ : M → N
⊢ IsClosed {f | ∀ (c : M) (x : α), f (c • x) = σ c • f x}
state_after: M : Type u_1
α✝ : Type u_2
β✝ : Type u_3
inst✝⁹ : TopologicalSpace α✝
inst✝⁸ : Monoid M
inst✝⁷ : MulAction M α✝
inst✝⁶ : ContinuousConstSMul M α✝
N : Type u_4
inst✝⁵ : Monoid N
α : Type u_5
β : Type u_6
inst✝⁴ : MulAction M α
inst✝³ : MulAction N β
inst✝² : TopologicalSpace β
inst✝¹ : T2Space β
inst✝ : ContinuousConstSMul N β
σ : M → N
⊢ IsClosed (⋂ i, ⋂ i_1, {x | x (i • i_1) = σ i • x i_1})

tactic: exact isClosed_iInter fun c => isClosed_iInter fun x =>
  isClosed_eq (continuous_apply _) ((continuous_apply _).const_smul _)
state_before: M : Type u_1
α✝ : Type u_2
β✝ : Type u_3
inst✝⁹ : TopologicalSpace α✝
inst✝⁸ : Monoid M
inst✝⁷ : MulAction M α✝
inst✝⁶ : ContinuousConstSMul M α✝
N : Type u_4
inst✝⁵ : Monoid N
α : Type u_5
β : Type u_6
inst✝⁴ : MulAction M α
inst✝³ : MulAction N β
inst✝² : TopologicalSpace β
inst✝¹ : T2Space β
inst✝ : ContinuousConstSMul N β
σ : M → N
⊢ IsClosed (⋂ i, ⋂ i_1, {x | x (i • i_1) = σ i • x i_1})
state_after: no goals
Theorem: tendsto_const_nhds_iff
File: Mathlib/Topology/Separation.lean

tactic: simp_rw [Tendsto, Filter.map_const, pure_le_nhds_iff]
state_before: X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : T1Space X
l : Filter Y
inst✝ : l.NeBot
c d : X
⊢ Tendsto (fun x => c) l (𝓝 d) ↔ c = d
state_after: no goals
Theorem: MeasureTheory.le_iInf₂_lintegral
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: convert (monotone_lintegral μ).map_iInf₂_le f with a
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
ι : Sort u_5
ι' : ι → Sort u_6
f : (i : ι) → ι' i → α → ℝ≥0∞
⊢ ∫⁻ (a : α), ⨅ i, ⨅ h, f i h a ∂μ ≤ ⨅ i, ⨅ h, ∫⁻ (a : α), f i h a ∂μ
state_after: case h.e'_3.h.e'_4.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
ι : Sort u_5
ι' : ι → Sort u_6
f : (i : ι) → ι' i → α → ℝ≥0∞
a : α
⊢ ⨅ i, ⨅ h, f i h a = (⨅ i, ⨅ j, f i j) a

tactic: simp only [iInf_apply]
state_before: case h.e'_3.h.e'_4.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
ι : Sort u_5
ι' : ι → Sort u_6
f : (i : ι) → ι' i → α → ℝ≥0∞
a : α
⊢ ⨅ i, ⨅ h, f i h a = (⨅ i, ⨅ j, f i j) a
state_after: no goals
Theorem: Nat.mem_factoredNumbers_of_primeFactors_subset
File: Mathlib/NumberTheory/SmoothNumbers.lean

tactic: rw [mem_factoredNumbers]
state_before: s : Finset ℕ
m : ℕ
hm : m ≠ 0
hp : m.primeFactors ⊆ s
⊢ m ∈ factoredNumbers s
state_after: s : Finset ℕ
m : ℕ
hm : m ≠ 0
hp : m.primeFactors ⊆ s
⊢ m ≠ 0 ∧ ∀ p ∈ m.factors, p ∈ s

tactic: exact ⟨hm, fun p hp' ↦ hp <| mem_primeFactors_iff_mem_factors.mpr hp'⟩
state_before: s : Finset ℕ
m : ℕ
hm : m ≠ 0
hp : m.primeFactors ⊆ s
⊢ m ≠ 0 ∧ ∀ p ∈ m.factors, p ∈ s
state_after: no goals
Theorem: Nat.div_eq_iff_eq_of_dvd_dvd
File: Mathlib/Data/Nat/Defs.lean

tactic: constructor <;> intro h
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
hn : n ≠ 0
ha : a ∣ n
hb : b ∣ n
⊢ n / a = n / b ↔ a = b
state_after: case mp
a b c d m n k : ℕ
p q : ℕ → Prop
hn : n ≠ 0
ha : a ∣ n
hb : b ∣ n
h : n / a = n / b
⊢ a = b

case mpr
a b c d m n k : ℕ
p q : ℕ → Prop
hn : n ≠ 0
ha : a ∣ n
hb : b ∣ n
h : a = b
⊢ n / a = n / b

tactic: rw [← Nat.mul_right_inj hn]
state_before: case mp
a b c d m n k : ℕ
p q : ℕ → Prop
hn : n ≠ 0
ha : a ∣ n
hb : b ∣ n
h : n / a = n / b
⊢ a = b
state_after: case mp
a b c d m n k : ℕ
p q : ℕ → Prop
hn : n ≠ 0
ha : a ∣ n
hb : b ∣ n
h : n / a = n / b
⊢ n * a = n * b

tactic: apply Nat.eq_mul_of_div_eq_left (Nat.dvd_trans hb (Nat.dvd_mul_right _ _))
state_before: case mp
a b c d m n k : ℕ
p q : ℕ → Prop
hn : n ≠ 0
ha : a ∣ n
hb : b ∣ n
h : n / a = n / b
⊢ n * a = n * b
state_after: case mp
a b c d m n k : ℕ
p q : ℕ → Prop
hn : n ≠ 0
ha : a ∣ n
hb : b ∣ n
h : n / a = n / b
⊢ n * a / b = n

tactic: rw [eq_comm, Nat.mul_comm, Nat.mul_div_assoc _ hb]
state_before: case mp
a b c d m n k : ℕ
p q : ℕ → Prop
hn : n ≠ 0
ha : a ∣ n
hb : b ∣ n
h : n / a = n / b
⊢ n * a / b = n
state_after: case mp
a b c d m n k : ℕ
p q : ℕ → Prop
hn : n ≠ 0
ha : a ∣ n
hb : b ∣ n
h : n / a = n / b
⊢ n = a * (n / b)

tactic: exact Nat.eq_mul_of_div_eq_right ha h
state_before: case mp
a b c d m n k : ℕ
p q : ℕ → Prop
hn : n ≠ 0
ha : a ∣ n
hb : b ∣ n
h : n / a = n / b
⊢ n = a * (n / b)
state_after: no goals

tactic: rw [h]
state_before: case mpr
a b c d m n k : ℕ
p q : ℕ → Prop
hn : n ≠ 0
ha : a ∣ n
hb : b ∣ n
h : a = b
⊢ n / a = n / b
state_after: no goals
Theorem: CategoryTheory.shiftFunctorAdd_assoc_inv_app
File: Mathlib/CategoryTheory/Shift/Basic.lean

tactic: simpa using NatTrans.congr_app (congr_arg Iso.inv (shiftFunctorAdd_assoc C a₁ a₂ a₃)) X
state_before: C : Type u
A : Type u_1
inst✝² : Category.{v, u} C
inst✝¹ : AddMonoid A
inst✝ : HasShift C A
a₁ a₂ a₃ : A
X : C
⊢ (shiftFunctor C a₃).map ((shiftFunctorAdd C a₁ a₂).inv.app X) ≫ (shiftFunctorAdd C (a₁ + a₂) a₃).inv.app X =
    (shiftFunctorAdd C a₂ a₃).inv.app ((shiftFunctor C a₁).obj X) ≫
      (shiftFunctorAdd' C a₁ (a₂ + a₃) (a₁ + a₂ + a₃) ⋯).inv.app X
state_after: no goals
Theorem: Set.LeftInvOn.extendDomain
File: Mathlib/Data/Set/Function.lean

tactic: rintro _ ⟨a, ha, rfl⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
p : β → Prop
inst✝ : DecidablePred p
f : α ≃ Subtype p
g g₁ g₂ : Perm α
s t : Set α
h : LeftInvOn (⇑g₁) (⇑g₂) s
⊢ LeftInvOn (⇑(g₁.extendDomain f)) (⇑(g₂.extendDomain f)) (Subtype.val ∘ ⇑f '' s)
state_after: case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
p : β → Prop
inst✝ : DecidablePred p
f : α ≃ Subtype p
g g₁ g₂ : Perm α
s t : Set α
h : LeftInvOn (⇑g₁) (⇑g₂) s
a : α
ha : a ∈ s
⊢ (g₁.extendDomain f) ((g₂.extendDomain f) ((Subtype.val ∘ ⇑f) a)) = (Subtype.val ∘ ⇑f) a

tactic: simp_rw [Function.comp_apply, extendDomain_apply_image, h ha]
state_before: case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
p : β → Prop
inst✝ : DecidablePred p
f : α ≃ Subtype p
g g₁ g₂ : Perm α
s t : Set α
h : LeftInvOn (⇑g₁) (⇑g₂) s
a : α
ha : a ∈ s
⊢ (g₁.extendDomain f) ((g₂.extendDomain f) ((Subtype.val ∘ ⇑f) a)) = (Subtype.val ∘ ⇑f) a
state_after: no goals
Theorem: Orientation.norm_div_tan_oangle_sub_left_of_oangle_eq_pi_div_two
File: Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean

tactic: rw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : o.oangle x y = ↑(π / 2)
⊢ ‖y‖ / (o.oangle (x - y) x).tan = ‖x‖
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : (-o).oangle y x = ↑(π / 2)
⊢ ‖y‖ / ((-o).oangle x (x - y)).tan = ‖x‖

tactic: exact (-o).norm_div_tan_oangle_sub_right_of_oangle_eq_pi_div_two h
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : (-o).oangle y x = ↑(π / 2)
⊢ ‖y‖ / ((-o).oangle x (x - y)).tan = ‖x‖
state_after: no goals
Theorem: Int.neg_emod_two
File: Mathlib/Data/Int/Defs.lean

tactic: apply Int.emod_eq_emod_iff_emod_sub_eq_zero.mpr
state_before: a b c d m n i : ℤ
⊢ -i % 2 = i % 2
state_after: a b c d m n i : ℤ
⊢ (-i - i) % 2 = 0

tactic: convert Int.mul_emod_right 2 (-i) using 2
state_before: a b c d m n i : ℤ
⊢ (-i - i) % 2 = 0
state_after: case h.e'_2.h.e'_5
a b c d m n i : ℤ
⊢ -i - i = 2 * -i

tactic: rw [Int.two_mul, Int.sub_eq_add_neg]
state_before: case h.e'_2.h.e'_5
a b c d m n i : ℤ
⊢ -i - i = 2 * -i
state_after: no goals
Theorem: CategoryTheory.Abelian.exact_of_is_cokernel
File: Mathlib/CategoryTheory/Abelian/Exact.lean

tactic: refine (exact_iff _ _).2 ⟨w, ?_⟩
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : Abelian C
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
h : IsColimit (CokernelCofork.ofπ g w)
⊢ Exact f g
state_after: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : Abelian C
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
h : IsColimit (CokernelCofork.ofπ g w)
⊢ kernel.ι g ≫ cokernel.π f = 0

tactic: have := h.fac (CokernelCofork.ofπ _ (cokernel.condition f)) WalkingParallelPair.one
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : Abelian C
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
h : IsColimit (CokernelCofork.ofπ g w)
⊢ kernel.ι g ≫ cokernel.π f = 0
state_after: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : Abelian C
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
h : IsColimit (CokernelCofork.ofπ g w)
this :
  (CokernelCofork.ofπ g w).ι.app WalkingParallelPair.one ≫ h.desc (CokernelCofork.ofπ (cokernel.π f) ⋯) =
    (CokernelCofork.ofπ (cokernel.π f) ⋯).ι.app WalkingParallelPair.one
⊢ kernel.ι g ≫ cokernel.π f = 0

tactic: simp only [Cofork.ofπ_ι_app] at this
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : Abelian C
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
h : IsColimit (CokernelCofork.ofπ g w)
this :
  (CokernelCofork.ofπ g w).ι.app WalkingParallelPair.one ≫ h.desc (CokernelCofork.ofπ (cokernel.π f) ⋯) =
    (CokernelCofork.ofπ (cokernel.π f) ⋯).ι.app WalkingParallelPair.one
⊢ kernel.ι g ≫ cokernel.π f = 0
state_after: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : Abelian C
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
h : IsColimit (CokernelCofork.ofπ g w)
this : g ≫ h.desc (CokernelCofork.ofπ (cokernel.π f) ⋯) = cokernel.π f
⊢ kernel.ι g ≫ cokernel.π f = 0

tactic: rw [← this, ← Category.assoc, kernel.condition, zero_comp]
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : Abelian C
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
h : IsColimit (CokernelCofork.ofπ g w)
this : g ≫ h.desc (CokernelCofork.ofπ (cokernel.π f) ⋯) = cokernel.π f
⊢ kernel.ι g ≫ cokernel.π f = 0
state_after: no goals