tasksource/leandojo huggingface dataset:
Theorem: List.modifyNthTail_modifyNthTail_le
File: Mathlib/Data/List/Basic.lean

tactic: rcases exists_add_of_le h with ⟨m, rfl⟩
state_before: ι : Type ?u.108113
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f g : List α → List α
m n : ℕ
l : List α
h : n ≤ m
⊢ modifyNthTail g m (modifyNthTail f n l) = modifyNthTail (fun l => modifyNthTail g (m - n) (f l)) n l

tactic: rw [@add_tsub_cancel_left, add_comm, modifyNthTail_modifyNthTail]
state_before: case intro
ι : Type ?u.108113
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f g : List α → List α
n : ℕ
l : List α
m : ℕ
h : n ≤ n + m
⊢ modifyNthTail g (n + m) (modifyNthTail f n l) = modifyNthTail (fun l => modifyNthTail g (n + m - n) (f l)) n l
Theorem: Rat.den_mk
File: Mathlib/Data/Rat/Lemmas.lean

tactic: rcases d with ((_ | _) | _) <;>
  simp [divInt, mkRat, Rat.normalize, Nat.succPNat, Int.sign, Int.gcd, -Nat.cast_succ]
state_before: n d : ℤ
⊢ (n /. d).den = if d = 0 then 1 else Int.natAbs d / Int.gcd n d
Theorem: Cubic.a_of_eq
File: Mathlib/Algebra/CubicDiscriminant.lean

tactic: rw [← coeff_eq_a, h, coeff_eq_a]
state_before: R : Type u_1
S : Type ?u.286399
F : Type ?u.286402
K : Type ?u.286405
P Q : Cubic R
a b c d a' b' c' d' : R
inst✝ : Semiring R
h : toPoly P = toPoly Q
⊢ P.a = Q.a
Theorem: Int.eq_ofNat_of_zero_le
File: Std/Data/Int/Lemmas.lean

tactic: have t := le.dest_sub h
state_before: a : Int
h : 0 ≤ a
⊢ ∃ n, a = ↑n

tactic: simp [Int.sub_eq_add_neg] at t
state_before: a : Int
h : 0 ≤ a
t : ∃ n, a - 0 = ↑n
⊢ ∃ n, a = ↑n

tactic: exact t
state_before: a : Int
h : 0 ≤ a
t : ∃ n, a = ↑n
⊢ ∃ n, a = ↑n
Theorem: Real.rpow_le_rpow
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: rcases eq_or_lt_of_le h₁ with (rfl | h₁')
state_before: x✝ y✝ z✝ x y z : ℝ
h : 0 ≤ x
h₁ : x ≤ y
h₂ : 0 ≤ z
⊢ x ^ z ≤ y ^ z

tactic: rcases eq_or_lt_of_le h₂ with (rfl | h₂')
state_before: case inr
x✝ y✝ z✝ x y z : ℝ
h : 0 ≤ x
h₁ : x ≤ y
h₂ : 0 ≤ z
h₁' : x < y
⊢ x ^ z ≤ y ^ z

tactic: exact le_of_lt (rpow_lt_rpow h h₁' h₂')
state_before: case inr.inr
x✝ y✝ z✝ x y z : ℝ
h : 0 ≤ x
h₁ : x ≤ y
h₂ : 0 ≤ z
h₁' : x < y
h₂' : 0 < z
⊢ x ^ z ≤ y ^ z

tactic: rfl
state_before: case inl
x✝ y z✝ x z : ℝ
h : 0 ≤ x
h₂ : 0 ≤ z
h₁ : x ≤ x
⊢ x ^ z ≤ x ^ z

tactic: simp
state_before: case inr.inl
x✝ y✝ z x y : ℝ
h : 0 ≤ x
h₁ : x ≤ y
h₁' : x < y
h₂ : 0 ≤ 0
⊢ x ^ 0 ≤ y ^ 0
Theorem: Rat.mul_num_den
File: Mathlib/Data/Rat/Defs.lean

tactic: have hq' : (↑q.den : ℤ) ≠ 0 := by have := den_nz q; simpa
state_before: a b c q r : ℚ
⊢ q * r = q.num * r.num /. ↑(q.den * r.den)

tactic: have hr' : (↑r.den : ℤ) ≠ 0 := by have := den_nz r; simpa
state_before: a b c q r : ℚ
hq' : ↑q.den ≠ 0
⊢ q * r = q.num * r.num /. ↑(q.den * r.den)

tactic: suffices q.num /. ↑q.den * (r.num /. ↑r.den) = q.num * r.num /. ↑(q.den * r.den) by
  simpa [num_den] using this
state_before: a b c q r : ℚ
hq' : ↑q.den ≠ 0
hr' : ↑r.den ≠ 0
⊢ q * r = q.num * r.num /. ↑(q.den * r.den)

tactic: simp [mul_def' hq' hr']
state_before: a b c q r : ℚ
hq' : ↑q.den ≠ 0
hr' : ↑r.den ≠ 0
⊢ q.num /. ↑q.den * (r.num /. ↑r.den) = q.num * r.num /. ↑(q.den * r.den)

tactic: have := den_nz q
state_before: a b c q r : ℚ
⊢ ↑q.den ≠ 0

tactic: simpa
state_before: a b c q r : ℚ
this : q.den ≠ 0
⊢ ↑q.den ≠ 0

tactic: have := den_nz r
state_before: a b c q r : ℚ
hq' : ↑q.den ≠ 0
⊢ ↑r.den ≠ 0

tactic: simpa
state_before: a b c q r : ℚ
hq' : ↑q.den ≠ 0
this : r.den ≠ 0
⊢ ↑r.den ≠ 0

tactic: simpa [num_den] using this
state_before: a b c q r : ℚ
hq' : ↑q.den ≠ 0
hr' : ↑r.den ≠ 0
this : q.num /. ↑q.den * (r.num /. ↑r.den) = q.num * r.num /. ↑(q.den * r.den)
⊢ q * r = q.num * r.num /. ↑(q.den * r.den)
Theorem: Real.cos_eq_cos_iff
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean

tactic: exact_mod_cast @Complex.cos_eq_cos_iff x y
state_before: x y : ℝ
⊢ cos x = cos y ↔ ∃ k, y = 2 * ↑k * π + x ∨ y = 2 * ↑k * π - x
Theorem: MeasureTheory.FiniteMeasure.coeFn_zero
File: Mathlib/MeasureTheory/Measure/FiniteMeasure.lean

tactic: funext
state_before: Ω : Type u_1
inst✝⁴ : MeasurableSpace Ω
R : Type ?u.10659
inst✝³ : SMul R ℝ≥0
inst✝² : SMul R ℝ≥0∞
inst✝¹ : IsScalarTower R ℝ≥0 ℝ≥0∞
inst✝ : IsScalarTower R ℝ≥0∞ ℝ≥0∞
⊢ (fun s => ENNReal.toNNReal (↑↑↑0 s)) = 0

tactic: rfl
state_before: case h
Ω : Type u_1
inst✝⁴ : MeasurableSpace Ω
R : Type ?u.10659
inst✝³ : SMul R ℝ≥0
inst✝² : SMul R ℝ≥0∞
inst✝¹ : IsScalarTower R ℝ≥0 ℝ≥0∞
inst✝ : IsScalarTower R ℝ≥0∞ ℝ≥0∞
x✝ : Set Ω
⊢ ENNReal.toNNReal (↑↑↑0 x✝) = OfNat.ofNat 0 x✝
Theorem: exists_signed_sum
File: Mathlib/Data/Sign.lean

tactic: simp [ht]
state_before: α✝ : Type ?u.148808
α : Type u_1
inst✝ : DecidableEq α
s : Finset α
f : α → ℤ
β : Type u_1
t : Finset β
sgn : β → SignType
g : β → α
hg : ∀ (b : β), g b ∈ s
ht : card t = ∑ a in s, Int.natAbs (f a)
hf : ∀ (a : α), a ∈ s → (∑ b in t, if g b = a then ↑(sgn b) else 0) = f a
⊢ Fintype.card { x // x ∈ t } = ∑ a in s, Int.natAbs (f a)
Theorem: Option.map_pmap
File: Mathlib/Data/Option/Basic.lean

tactic: cases x <;> simp only [map_none', map_some', pmap]
state_before: α : Type u_1
β : Type u_3
γ : Type u_2
δ : Type ?u.8249
p : α → Prop
f✝ : (a : α) → p a → β
x✝ : Option α
g : β → γ
f : (a : α) → p a → β
x : Option α
H : ∀ (a : α), a ∈ x → p a
⊢ Option.map g (pmap f x H) = pmap (fun a h => g (f a h)) x H
Theorem: Polynomial.sum_range_pow_eq_bernoulli_sub
File: Mathlib/NumberTheory/BernoulliPolynomials.lean

tactic: rw [sum_range_pow, bernoulli_def, eval_finset_sum, ← sum_div, mul_div_cancel' _ _]
state_before: n p : ℕ
⊢ (↑p + 1) * ∑ k in range n, ↑k ^ p = eval (↑n) (bernoulli (succ p)) - _root_.bernoulli (succ p)

tactic: simp_rw [eval_monomial]
state_before: n p : ℕ
⊢ ∑ x in range (p + 1), _root_.bernoulli x * ↑(Nat.choose (p + 1) x) * ↑n ^ (p + 1 - x) =
    ∑ i in range (succ p + 1), eval (↑n) (↑(monomial i) (_root_.bernoulli (succ p - i) * ↑(Nat.choose (succ p) i))) -
      _root_.bernoulli (succ p)

tactic: symm
state_before: n p : ℕ
⊢ ∑ x in range (p + 1), _root_.bernoulli x * ↑(Nat.choose (p + 1) x) * ↑n ^ (p + 1 - x) =
    ∑ x in range (succ p + 1), _root_.bernoulli (succ p - x) * ↑(Nat.choose (succ p) x) * ↑n ^ x -
      _root_.bernoulli (succ p)

tactic: rw [← sum_flip _, sum_range_succ]
state_before: n p : ℕ
⊢ ∑ x in range (succ p + 1), _root_.bernoulli (succ p - x) * ↑(Nat.choose (succ p) x) * ↑n ^ x -
      _root_.bernoulli (succ p) =
    ∑ x in range (p + 1), _root_.bernoulli x * ↑(Nat.choose (p + 1) x) * ↑n ^ (p + 1 - x)

tactic: simp only [tsub_self, tsub_zero, choose_zero_right, cast_one, mul_one, _root_.pow_zero,
  add_tsub_cancel_right]
state_before: n p : ℕ
⊢ ∑ x in range (p + 1),
          _root_.bernoulli (succ p - (p + 1 - x)) * ↑(Nat.choose (succ p) (p + 1 - x)) * ↑n ^ (p + 1 - x) +
        _root_.bernoulli (succ p - (p + 1 - (p + 1))) * ↑(Nat.choose (succ p) (p + 1 - (p + 1))) *
          ↑n ^ (p + 1 - (p + 1)) -
      _root_.bernoulli (succ p) =
    ∑ x in range (p + 1), _root_.bernoulli x * ↑(Nat.choose (p + 1) x) * ↑n ^ (p + 1 - x)

tactic: apply sum_congr rfl fun x hx => _
state_before: n p : ℕ
⊢ ∑ x in range (p + 1),
      _root_.bernoulli (succ p - (p + 1 - x)) * ↑(Nat.choose (succ p) (p + 1 - x)) * ↑n ^ (p + 1 - x) =
    ∑ x in range (p + 1), _root_.bernoulli x * ↑(Nat.choose (p + 1) x) * ↑n ^ (p + 1 - x)

tactic: intro x hx
state_before: n p : ℕ
⊢ ∀ (x : ℕ),
    x ∈ range (p + 1) →
      _root_.bernoulli (succ p - (p + 1 - x)) * ↑(Nat.choose (succ p) (p + 1 - x)) * ↑n ^ (p + 1 - x) =
        _root_.bernoulli x * ↑(Nat.choose (p + 1) x) * ↑n ^ (p + 1 - x)

tactic: apply congr_arg₂ _ (congr_arg₂ _ _ _) rfl
state_before: n p x : ℕ
hx : x ∈ range (p + 1)
⊢ _root_.bernoulli (succ p - (p + 1 - x)) * ↑(Nat.choose (succ p) (p + 1 - x)) * ↑n ^ (p + 1 - x) =
    _root_.bernoulli x * ↑(Nat.choose (p + 1) x) * ↑n ^ (p + 1 - x)

tactic: rw [Nat.sub_sub_self (mem_range_le hx)]
state_before: n p x : ℕ
hx : x ∈ range (p + 1)
⊢ _root_.bernoulli (succ p - (p + 1 - x)) = _root_.bernoulli x

tactic: rw [← choose_symm (mem_range_le hx)]
state_before: n p x : ℕ
hx : x ∈ range (p + 1)
⊢ ↑(Nat.choose (succ p) (p + 1 - x)) = ↑(Nat.choose (p + 1) x)

tactic: norm_cast
state_before: n p : ℕ
⊢ ↑p + 1 ≠ 0

tactic: apply succ_ne_zero _
state_before: n p : ℕ
⊢ ¬p + 1 = 0
Theorem: MeasureTheory.FiniteMeasure.tendsto_normalize_of_tendsto
File: Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean

tactic: rw [ProbabilityMeasure.tendsto_nhds_iff_toFiniteMeasure_tendsto_nhds,
  tendsto_iff_forall_testAgainstNN_tendsto]
state_before: Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μs_lim : Tendsto μs F (𝓝 μ)
nonzero : μ ≠ 0
⊢ Tendsto (fun i => normalize (μs i)) F (𝓝 (normalize μ))

tactic: exact fun f => tendsto_normalize_testAgainstNN_of_tendsto μs_lim nonzero f
state_before: Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μs_lim : Tendsto μs F (𝓝 μ)
nonzero : μ ≠ 0
⊢ ∀ (f : Ω →ᵇ ℝ≥0),
    Tendsto (fun i => testAgainstNN ((ProbabilityMeasure.toFiniteMeasure ∘ fun i => normalize (μs i)) i) f) F
      (𝓝 (testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize μ)) f))
Theorem: nhds_induced
File: Mathlib/Topology/Order.lean

tactic: ext s
state_before: α : Type u
β : Type v
γ : Type ?u.44623
f✝ : α → β
ι : Sort ?u.44630
T : TopologicalSpace α
f : β → α
a : β
⊢ 𝓝 a = comap f (𝓝 (f a))

tactic: rw [mem_nhds_induced, mem_comap]
state_before: case a
α : Type u
β : Type v
γ : Type ?u.44623
f✝ : α → β
ι : Sort ?u.44630
T : TopologicalSpace α
f : β → α
a : β
s : Set β
⊢ s ∈ 𝓝 a ↔ s ∈ comap f (𝓝 (f a))
Theorem: PGame.neg_lt_neg_iff
File: Mathlib/SetTheory/Game/PGame.lean

tactic: rw [lt_iff_le_and_lf, lt_iff_le_and_lf, neg_le_neg_iff, neg_lf_neg_iff]
state_before: x y : PGame
⊢ -y < -x ↔ x < y
Theorem: Polynomial.IsPrimitive.mul
File: Mathlib/RingTheory/Polynomial/Content.lean

tactic: rw [isPrimitive_iff_content_eq_one, content_mul, hp.content_eq_one, hq.content_eq_one, mul_one]
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p q : R[X]
hp : IsPrimitive p
hq : IsPrimitive q
⊢ IsPrimitive (p * q)
Theorem: Polynomial.Separable.of_mul_right
File: Mathlib/FieldTheory/Separable.lean

tactic: rw [mul_comm] at h
state_before: R : Type u
inst✝¹ : CommSemiring R
S : Type v
inst✝ : CommSemiring S
f g : R[X]
h : Separable (f * g)
⊢ Separable g

tactic: exact h.of_mul_left
state_before: R : Type u
inst✝¹ : CommSemiring R
S : Type v
inst✝ : CommSemiring S
f g : R[X]
h : Separable (g * f)
⊢ Separable g
Theorem: Subgroup.transferTransversal_apply'
File: Mathlib/GroupTheory/Complement.lean

tactic: rw [transferTransversal_apply, transferFunction_apply, ← quotientEquivSigmaZMod_symm_apply,
  apply_symm_apply]
state_before: G : Type u
inst✝ : Group G
H : Subgroup G
g : G
q : orbitRel.Quotient { x // x ∈ zpowers g } (G ⧸ H)
k : ZMod (minimalPeriod ((fun x x_1 => x • x_1) g) (Quotient.out' q))
⊢ ↑(↑(toEquiv (_ : ↑(transferTransversal H g) ∈ leftTransversals ↑H)) (g ^ ↑k • Quotient.out' q)) =
    g ^ ↑k * Quotient.out' (Quotient.out' q)
Theorem: DualNumber.lift_apply_eps
File: Mathlib/Algebra/DualNumber.lean

tactic: simp only [lift_apply_apply, fst_eps, map_zero, snd_eps, one_smul, zero_add]
state_before: R : Type u_2
A : Type u_1
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
e : { e // e * e = 0 }
⊢ ↑(↑lift e) ε = ↑e
Theorem: GeneralizedContinuedFraction.convergents'Aux_succ_some
File: Mathlib/Algebra/ContinuedFractions/Translations.lean

tactic: simp [convergents'Aux, h, convergents'Aux.match_1]
state_before: K : Type u_1
g : GeneralizedContinuedFraction K
n✝ : ℕ
inst✝ : DivisionRing K
s : Stream'.Seq (Pair K)
p : Pair K
h : Stream'.Seq.head s = some p
n : ℕ
⊢ convergents'Aux s (n + 1) = p.a / (p.b + convergents'Aux (Stream'.Seq.tail s) n)
Theorem: Ideal.finsuppTotal_apply_eq_of_fintype
File: Mathlib/RingTheory/Ideal/Operations.lean

tactic: rw [finsuppTotal_apply, Finsupp.sum_fintype]
state_before: ι : Type u_1
M : Type u_3
inst✝³ : AddCommGroup M
R : Type u_2
inst✝² : CommRing R
inst✝¹ : Module R M
I : Ideal R
v : ι → M
hv : Submodule.span R (Set.range v) = ⊤
inst✝ : Fintype ι
f : ι →₀ { x // x ∈ I }
⊢ ↑(finsuppTotal ι M I v) f = ∑ i : ι, ↑(↑f i) • v i

tactic: exact fun _ => zero_smul _ _
state_before: case h
ι : Type u_1
M : Type u_3
inst✝³ : AddCommGroup M
R : Type u_2
inst✝² : CommRing R
inst✝¹ : Module R M
I : Ideal R
v : ι → M
hv : Submodule.span R (Set.range v) = ⊤
inst✝ : Fintype ι
f : ι →₀ { x // x ∈ I }
⊢ ∀ (i : ι), ↑0 • v i = 0
Theorem: Equiv.Perm.subtypeCongr.refl
File: Mathlib/Logic/Equiv/Basic.lean

tactic: ext x
state_before: ε : Type u_1
p : ε → Prop
inst✝ : DecidablePred p
ep ep' : Perm { a // p a }
en en' : Perm { a // ¬p a }
⊢ subtypeCongr (Equiv.refl { a // p a }) (Equiv.refl { a // ¬p a }) = Equiv.refl ε

tactic: by_cases h:p x <;> simp [h]
state_before: case H
ε : Type u_1
p : ε → Prop
inst✝ : DecidablePred p
ep ep' : Perm { a // p a }
en en' : Perm { a // ¬p a }
x : ε
⊢ ↑(subtypeCongr (Equiv.refl { a // p a }) (Equiv.refl { a // ¬p a })) x = ↑(Equiv.refl ε) x
Theorem: CategoryTheory.Equivalence.funInvIdAssoc_hom_app
File: Mathlib/CategoryTheory/Equivalence.lean

tactic: dsimp [funInvIdAssoc]
state_before: C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
E : Type u₃
inst✝ : Category E
e : C ≌ D
F : C ⥤ E
X : C
⊢ (funInvIdAssoc e F).hom.app X = F.map ((unitInv e).app X)

tactic: aesop_cat
state_before: C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
E : Type u₃
inst✝ : Category E
e : C ≌ D
F : C ⥤ E
X : C
⊢ 𝟙 (F.obj (e.inverse.obj (e.functor.obj X))) ≫ F.map (e.unitIso.inv.app X) ≫ 𝟙 (F.obj X) = F.map ((unitInv e).app X)
Theorem: ENNReal.mul_inv_cancel
File: Mathlib/Data/Real/ENNReal.lean

tactic: lift a to ℝ≥0 using ht
state_before: α : Type ?u.226273
β : Type ?u.226276
a b c d : ℝ≥0∞
r p q : ℝ≥0
h0 : a ≠ 0
ht : a ≠ ⊤
⊢ a * a⁻¹ = 1

tactic: norm_cast at h0
state_before: case intro
α : Type ?u.226273
β : Type ?u.226276
b c d : ℝ≥0∞
r p q a : ℝ≥0
h0 : ↑a ≠ 0
⊢ ↑a * (↑a)⁻¹ = 1

tactic: norm_cast
state_before: case intro
α : Type ?u.226273
β : Type ?u.226276
b c d : ℝ≥0∞
r p q a : ℝ≥0
h0 : ¬a = 0
⊢ ↑a * (↑a)⁻¹ = 1

tactic: exact mul_inv_cancel h0
state_before: case intro
α : Type ?u.226273
β : Type ?u.226276
b c d : ℝ≥0∞
r p q a : ℝ≥0
h0 : ¬a = 0
⊢ a * a⁻¹ = 1
Theorem: Nat.log_div_base
File: Mathlib/Data/Nat/Log.lean

tactic: cases' le_or_lt b 1 with hb hb
state_before: b n : ℕ
⊢ log b (n / b) = log b n - 1

tactic: cases' lt_or_le n b with h h
state_before: case inr
b n : ℕ
hb : 1 < b
⊢ log b (n / b) = log b n - 1

tactic: rw [log_of_one_lt_of_le hb h, add_tsub_cancel_right]
state_before: case inr.inr
b n : ℕ
hb : 1 < b
h : b ≤ n
⊢ log b (n / b) = log b n - 1

tactic: rw [log_of_left_le_one hb, log_of_left_le_one hb, Nat.zero_sub]
state_before: case inl
b n : ℕ
hb : b ≤ 1
⊢ log b (n / b) = log b n - 1

tactic: rw [div_eq_of_lt h, log_of_lt h, log_zero_right]
state_before: case inr.inl
b n : ℕ
hb : 1 < b
h : n < b
⊢ log b (n / b) = log b n - 1
Theorem: Finset.gcd_eq_of_dvd_sub
File: Mathlib/Algebra/GCDMonoid/Finset.lean

tactic: revert h
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.46050
inst✝² : CommRing α
inst✝¹ : IsDomain α
inst✝ : NormalizedGCDMonoid α
s : Finset β
f g : β → α
a : α
h : ∀ (x : β), x ∈ s → a ∣ f x - g x
⊢ GCDMonoid.gcd a (gcd s f) = GCDMonoid.gcd a (gcd s g)

tactic: refine' s.induction_on _ _
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.46050
inst✝² : CommRing α
inst✝¹ : IsDomain α
inst✝ : NormalizedGCDMonoid α
s : Finset β
f g : β → α
a : α
⊢ (∀ (x : β), x ∈ s → a ∣ f x - g x) → GCDMonoid.gcd a (gcd s f) = GCDMonoid.gcd a (gcd s g)

tactic: intro b s _ hi h
state_before: case refine'_2
α : Type u_2
β : Type u_1
γ : Type ?u.46050
inst✝² : CommRing α
inst✝¹ : IsDomain α
inst✝ : NormalizedGCDMonoid α
s : Finset β
f g : β → α
a : α
⊢ ∀ ⦃a_1 : β⦄ {s : Finset β},
    ¬a_1 ∈ s →
      ((∀ (x : β), x ∈ s → a ∣ f x - g x) → GCDMonoid.gcd a (gcd s f) = GCDMonoid.gcd a (gcd s g)) →
        (∀ (x : β), x ∈ insert a_1 s → a ∣ f x - g x) →
          GCDMonoid.gcd a (gcd (insert a_1 s) f) = GCDMonoid.gcd a (gcd (insert a_1 s) g)

tactic: rw [gcd_insert, gcd_insert, gcd_comm (f b), ← gcd_assoc,
  hi fun x hx ↦ h _ (mem_insert_of_mem hx), gcd_comm a, gcd_assoc,
  gcd_comm a (GCDMonoid.gcd _ _), gcd_comm (g b), gcd_assoc _ _ a, gcd_comm _ a]
state_before: case refine'_2
α : Type u_2
β : Type u_1
γ : Type ?u.46050
inst✝² : CommRing α
inst✝¹ : IsDomain α
inst✝ : NormalizedGCDMonoid α
s✝ : Finset β
f g : β → α
a : α
b : β
s : Finset β
a✝ : ¬b ∈ s
hi : (∀ (x : β), x ∈ s → a ∣ f x - g x) → GCDMonoid.gcd a (gcd s f) = GCDMonoid.gcd a (gcd s g)
h : ∀ (x : β), x ∈ insert b s → a ∣ f x - g x
⊢ GCDMonoid.gcd a (gcd (insert b s) f) = GCDMonoid.gcd a (gcd (insert b s) g)

tactic: exact congr_arg _ (gcd_eq_of_dvd_sub_right (h _ (mem_insert_self _ _)))
state_before: case refine'_2
α : Type u_2
β : Type u_1
γ : Type ?u.46050
inst✝² : CommRing α
inst✝¹ : IsDomain α
inst✝ : NormalizedGCDMonoid α
s✝ : Finset β
f g : β → α
a : α
b : β
s : Finset β
a✝ : ¬b ∈ s
hi : (∀ (x : β), x ∈ s → a ∣ f x - g x) → GCDMonoid.gcd a (gcd s f) = GCDMonoid.gcd a (gcd s g)
h : ∀ (x : β), x ∈ insert b s → a ∣ f x - g x
⊢ GCDMonoid.gcd (gcd s g) (GCDMonoid.gcd a (f b)) = GCDMonoid.gcd (gcd s g) (GCDMonoid.gcd a (g b))

tactic: simp
state_before: case refine'_1
α : Type u_2
β : Type u_1
γ : Type ?u.46050
inst✝² : CommRing α
inst✝¹ : IsDomain α
inst✝ : NormalizedGCDMonoid α
s : Finset β
f g : β → α
a : α
⊢ (∀ (x : β), x ∈ ∅ → a ∣ f x - g x) → GCDMonoid.gcd a (gcd ∅ f) = GCDMonoid.gcd a (gcd ∅ g)
Theorem: MvPolynomial.bind₂_monomial_one
File: Mathlib/Data/MvPolynomial/Monad.lean

tactic: rw [bind₂_monomial, f.map_one, one_mul]
state_before: σ : Type u_3
τ : Type ?u.1299781
R : Type u_1
S : Type u_2
T : Type ?u.1299790
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : CommSemiring T
f✝ : σ → MvPolynomial τ R
f : R →+* MvPolynomial σ S
d : σ →₀ ℕ
⊢ ↑(bind₂ f) (↑(monomial d) 1) = ↑(monomial d) 1
Theorem: tendsto_const_div_atTop_nhds_0_nat
File: Mathlib/Analysis/SpecificLimits/Basic.lean

tactic: simpa only [MulZeroClass.mul_zero] using tendsto_const_nhds.mul tendsto_inverse_atTop_nhds_0_nat
state_before: α : Type ?u.533
β : Type ?u.536
ι : Type ?u.539
C : ℝ
⊢ Tendsto (fun n => C / ↑n) atTop (𝓝 0)
Theorem: Rat.le_trans
File: Mathlib/Data/Rat/Order.lean

tactic: rw [Rat.le_iff_Nonneg] at hab hbc
state_before: a✝ b✝ c✝ a b c : ℚ
hab : a ≤ b
hbc : b ≤ c
⊢ a ≤ c

tactic: have : Rat.Nonneg (b - a + (c - b)) := Rat.nonneg_add hab hbc
state_before: a✝ b✝ c✝ a b c : ℚ
hab : Rat.Nonneg (b - a)
hbc : Rat.Nonneg (c - b)
⊢ a ≤ c

tactic: simp_rw [sub_eq_add_neg, add_left_comm (b + -a) c (-b), add_comm (b + -a) (-b),
  add_left_comm (-b) b (-a), add_comm (-b) (-a), add_neg_cancel_comm_assoc,
  ← sub_eq_add_neg] at this
state_before: a✝ b✝ c✝ a b c : ℚ
hab : Rat.Nonneg (b - a)
hbc : Rat.Nonneg (c - b)
this : Rat.Nonneg (b - a + (c - b))
⊢ a ≤ c

tactic: rw [Rat.le_iff_Nonneg]
state_before: a✝ b✝ c✝ a b c : ℚ
hab : Rat.Nonneg (b - a)
hbc : Rat.Nonneg (c - b)
this : Rat.Nonneg (c - a)
⊢ a ≤ c

tactic: exact this
state_before: a✝ b✝ c✝ a b c : ℚ
hab : Rat.Nonneg (b - a)
hbc : Rat.Nonneg (c - b)
this : Rat.Nonneg (c - a)
⊢ Rat.Nonneg (c - a)
Theorem: Additive.isAddSubgroup_iff
File: Mathlib/Deprecated/Subgroup.lean

tactic: rintro ⟨⟨h₁, h₂⟩, h₃⟩
state_before: G : Type u_1
H : Type ?u.2672
A : Type ?u.2675
a a₁ a₂ b c : G
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
⊢ IsAddSubgroup s → IsSubgroup s

tactic: exact @IsSubgroup.mk G _ _ ⟨h₁, @h₂⟩ @h₃
state_before: case mk.mk
G : Type u_1
H : Type ?u.2672
A : Type ?u.2675
a a₁ a₂ b c : G
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
h₃ : ∀ {a : Additive G}, a ∈ s → -a ∈ s
h₁ : 0 ∈ s
h₂ : ∀ {a b : Additive G}, a ∈ s → b ∈ s → a + b ∈ s
⊢ IsSubgroup s
Theorem: Polynomial.monic_C_mul_of_mul_leadingCoeff_eq_one
File: Mathlib/Data/Polynomial/Monic.lean

tactic: unfold Monic
state_before: R : Type u
S : Type v
a b✝ : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
b : R
hp : b * leadingCoeff p = 1
⊢ Monic (↑C b * p)

tactic: nontriviality
state_before: R : Type u
S : Type v
a b✝ : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
b : R
hp : b * leadingCoeff p = 1
⊢ leadingCoeff (↑C b * p) = 1

tactic: rw [leadingCoeff_mul' _] <;> simp [leadingCoeff_C b, hp]
state_before: R : Type u
S : Type v
a b✝ : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
b : R
hp : b * leadingCoeff p = 1
✝ : Nontrivial R
⊢ leadingCoeff (↑C b * p) = 1
Theorem: TendstoUniformlyOn.congr_right
File: Mathlib/Topology/UniformSpace/UniformConvergence.lean

tactic: filter_upwards [hf u hu]with i hi a ha using hfg ha ▸ hi a ha
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝ : UniformSpace β
F : ι → α → β
f : α → β
s s' : Set α
x : α
p : Filter ι
p' : Filter α
g✝ : ι → α
g : α → β
hf : TendstoUniformlyOn F f p s
hfg : EqOn f g s
u : Set (β × β)
hu : u ∈ 𝓤 β
⊢ ∀ᶠ (n : ι) in p, ∀ (x : α), x ∈ s → (g x, F n x) ∈ u
Theorem: exists_open_nhds_disjoint_closure
File: Mathlib/Topology/Separation.lean

tactic: simpa only [exists_prop, and_assoc] using
  ((nhds_basis_opens x).lift'_closure.disjoint_iff (nhds_basis_opens y).lift'_closure).1
    (disjoint_lift'_closure_nhds.2 h)
state_before: α : Type u
β : Type v
inst✝¹ : TopologicalSpace α
inst✝ : T25Space α
x y : α
h : x ≠ y
⊢ ∃ u, x ∈ u ∧ IsOpen u ∧ ∃ v, y ∈ v ∧ IsOpen v ∧ Disjoint (closure u) (closure v)
Theorem: MvPowerSeries.X_inj
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: intro h
state_before: σ : Type u_2
R : Type u_1
inst✝¹ : Semiring R
inst✝ : Nontrivial R
s t : σ
⊢ X s = X t → s = t

tactic: replace h := congr_arg (coeff R (single s 1)) h
state_before: σ : Type u_2
R : Type u_1
inst✝¹ : Semiring R
inst✝ : Nontrivial R
s t : σ
h : X s = X t
⊢ s = t

tactic: rw [coeff_X, if_pos rfl, coeff_X] at h
state_before: σ : Type u_2
R : Type u_1
inst✝¹ : Semiring R
inst✝ : Nontrivial R
s t : σ
h : ↑(coeff R (single s 1)) (X s) = ↑(coeff R (single s 1)) (X t)
⊢ s = t

tactic: split_ifs  at h with H
state_before: σ : Type u_2
R : Type u_1
inst✝¹ : Semiring R
inst✝ : Nontrivial R
s t : σ
h✝¹ : ↑(coeff R (single s 1)) (X s) = ↑(coeff R (single s 1)) (X t)
h✝ : 1 = ↑(coeff R (single s 1)) (X t)
h : 1 = if single s 1 = single t 1 then 1 else 0
⊢ s = t

tactic: rw [Finsupp.single_eq_single_iff] at H
state_before: case inl
σ : Type u_2
R : Type u_1
inst✝¹ : Semiring R
inst✝ : Nontrivial R
s t : σ
h✝¹ : ↑(coeff R (single s 1)) (X s) = ↑(coeff R (single s 1)) (X t)
h✝ : 1 = ↑(coeff R (single s 1)) (X t)
H : single s 1 = single t 1
h : 1 = 1
⊢ s = t

tactic: cases' H with H H
state_before: case inl
σ : Type u_2
R : Type u_1
inst✝¹ : Semiring R
inst✝ : Nontrivial R
s t : σ
h✝¹ : ↑(coeff R (single s 1)) (X s) = ↑(coeff R (single s 1)) (X t)
h✝ : 1 = ↑(coeff R (single s 1)) (X t)
H : s = t ∧ 1 = 1 ∨ 1 = 0 ∧ 1 = 0
h : 1 = 1
⊢ s = t

tactic: exact H.1
state_before: case inl.inl
σ : Type u_2
R : Type u_1
inst✝¹ : Semiring R
inst✝ : Nontrivial R
s t : σ
h✝¹ : ↑(coeff R (single s 1)) (X s) = ↑(coeff R (single s 1)) (X t)
h✝ : 1 = ↑(coeff R (single s 1)) (X t)
h : 1 = 1
H : s = t ∧ 1 = 1
⊢ s = t

tactic: exfalso
state_before: case inl.inr
σ : Type u_2
R : Type u_1
inst✝¹ : Semiring R
inst✝ : Nontrivial R
s t : σ
h✝¹ : ↑(coeff R (single s 1)) (X s) = ↑(coeff R (single s 1)) (X t)
h✝ : 1 = ↑(coeff R (single s 1)) (X t)
h : 1 = 1
H : 1 = 0 ∧ 1 = 0
⊢ s = t

tactic: exact one_ne_zero H.1
state_before: case inl.inr.h
σ : Type u_2
R : Type u_1
inst✝¹ : Semiring R
inst✝ : Nontrivial R
s t : σ
h✝¹ : ↑(coeff R (single s 1)) (X s) = ↑(coeff R (single s 1)) (X t)
h✝ : 1 = ↑(coeff R (single s 1)) (X t)
h : 1 = 1
H : 1 = 0 ∧ 1 = 0
⊢ False

tactic: exfalso
state_before: case inr
σ : Type u_2
R : Type u_1
inst✝¹ : Semiring R
inst✝ : Nontrivial R
s t : σ
h✝¹ : ↑(coeff R (single s 1)) (X s) = ↑(coeff R (single s 1)) (X t)
h✝ : 1 = ↑(coeff R (single s 1)) (X t)
H : ¬single s 1 = single t 1
h : 1 = 0
⊢ s = t

tactic: exact one_ne_zero h
state_before: case inr.h
σ : Type u_2
R : Type u_1
inst✝¹ : Semiring R
inst✝ : Nontrivial R
s t : σ
h✝¹ : ↑(coeff R (single s 1)) (X s) = ↑(coeff R (single s 1)) (X t)
h✝ : 1 = ↑(coeff R (single s 1)) (X t)
H : ¬single s 1 = single t 1
h : 1 = 0
⊢ False