tasksource/leandojo huggingface dataset:
Theorem: Real.Angle.two_nsmul_toReal_eq_two_mul_add_two_pi
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: nth_rw 1 [← coe_toReal θ]
state_before: θ : Angle
⊢ toReal (2 • θ) = 2 * toReal θ + 2 * π ↔ toReal θ ≤ -π / 2

tactic: rw [← coe_nsmul, two_nsmul, ← two_mul, toReal_coe_eq_self_add_two_pi_iff, Set.mem_Ioc]
state_before: θ : Angle
⊢ toReal (2 • ↑(toReal θ)) = 2 * toReal θ + 2 * π ↔ toReal θ ≤ -π / 2

tactic: refine'
  ⟨fun h => by linarith, fun h =>
    ⟨by linarith [pi_pos, neg_pi_lt_toReal θ], (le_div_iff' (zero_lt_two' ℝ)).1 h⟩⟩
state_before: θ : Angle
⊢ -3 * π < 2 * toReal θ ∧ 2 * toReal θ ≤ -π ↔ toReal θ ≤ -π / 2

tactic: linarith
state_before: θ : Angle
h : -3 * π < 2 * toReal θ ∧ 2 * toReal θ ≤ -π
⊢ toReal θ ≤ -π / 2

tactic: linarith [pi_pos, neg_pi_lt_toReal θ]
state_before: θ : Angle
h : toReal θ ≤ -π / 2
⊢ -3 * π < 2 * toReal θ
Theorem: Filter.comap_sSup
File: Mathlib/Order/Filter/Basic.lean

tactic: simp only [sSup_eq_iSup, comap_iSup, eq_self_iff_true]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.255463
ι : Sort x
f f₁ f₂ : Filter α
g g₁ g₂ : Filter β
m✝ : α → β
m' : β → γ
s✝ : Set α
t : Set β
s : Set (Filter β)
m : α → β
⊢ comap m (sSup s) = ⨆ (f : Filter β) (_ : f ∈ s), comap m f
Theorem: Finsupp.card_support_eq_zero
File: Mathlib/Data/Finsupp/Defs.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.20446
γ : Type ?u.20449
ι : Type ?u.20452
M : Type u_2
M' : Type ?u.20458
N : Type ?u.20461
P : Type ?u.20464
G : Type ?u.20467
H : Type ?u.20470
R : Type ?u.20473
S : Type ?u.20476
inst✝ : Zero M
f : α →₀ M
⊢ card f.support = 0 ↔ f = 0
Theorem: Finset.fold_cons
File: Mathlib/Data/Finset/Fold.lean

tactic: dsimp only [fold]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.2814
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
h : ¬a ∈ s
⊢ fold op b f (cons a s h) = op (f a) (fold op b f s)

tactic: rw [cons_val, Multiset.map_cons, fold_cons_left]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.2814
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
h : ¬a ∈ s
⊢ Multiset.fold op b (Multiset.map f (cons a s h).val) = op (f a) (Multiset.fold op b (Multiset.map f s.val))
Theorem: MvPolynomial.degreeOf_mul_X_ne
File: Mathlib/Data/MvPolynomial/Variables.lean

tactic: classical
repeat' rw [degreeOf_eq_sup (R:=R) i]
rw [support_mul_X]
simp only [Finset.sup_map]
congr
ext
simp only [Finsupp.single, Nat.one_ne_zero, add_right_eq_self, addRightEmbedding_apply, coe_mk,
  Pi.add_apply, comp_apply, ite_eq_right_iff, Finsupp.coe_add, Pi.single_eq_of_ne h]
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.313675
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
i j : σ
f : MvPolynomial σ R
h : i ≠ j
⊢ degreeOf i (f * X j) = degreeOf i f

tactic: repeat' rw [degreeOf_eq_sup (R:=R) i]
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.313675
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
i j : σ
f : MvPolynomial σ R
h : i ≠ j
⊢ degreeOf i (f * X j) = degreeOf i f

tactic: rw [support_mul_X]
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.313675
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
i j : σ
f : MvPolynomial σ R
h : i ≠ j
⊢ (Finset.sup (support (f * X j)) fun m => ↑m i) = Finset.sup (support f) fun m => ↑m i

tactic: simp only [Finset.sup_map]
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.313675
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
i j : σ
f : MvPolynomial σ R
h : i ≠ j
⊢ (Finset.sup (Finset.map (addRightEmbedding (Finsupp.single j 1)) (support f)) fun m => ↑m i) =
    Finset.sup (support f) fun m => ↑m i

tactic: congr
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.313675
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
i j : σ
f : MvPolynomial σ R
h : i ≠ j
⊢ Finset.sup (support f) ((fun m => ↑m i) ∘ ↑(addRightEmbedding (Finsupp.single j 1))) =
    Finset.sup (support f) fun m => ↑m i

tactic: ext
state_before: case e_f
R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.313675
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
i j : σ
f : MvPolynomial σ R
h : i ≠ j
⊢ (fun m => ↑m i) ∘ ↑(addRightEmbedding (Finsupp.single j 1)) = fun m => ↑m i

tactic: simp only [Finsupp.single, Nat.one_ne_zero, add_right_eq_self, addRightEmbedding_apply, coe_mk,
  Pi.add_apply, comp_apply, ite_eq_right_iff, Finsupp.coe_add, Pi.single_eq_of_ne h]
state_before: case e_f.h
R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.313675
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
i j : σ
f : MvPolynomial σ R
h : i ≠ j
x✝ : σ →₀ ℕ
⊢ ((fun m => ↑m i) ∘ ↑(addRightEmbedding (Finsupp.single j 1))) x✝ = ↑x✝ i

tactic: rw [degreeOf_eq_sup (R:=R) i]
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.313675
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
i j : σ
f : MvPolynomial σ R
h : i ≠ j
⊢ (Finset.sup (support (f * X j)) fun m => ↑m i) = Finset.sup (support f) fun m => ↑m i
Theorem: BoxIntegral.IntegrationParams.henstock_le_mcShane
File: Mathlib/Analysis/BoxIntegral/Partition/Filter.lean

tactic: trivial
state_before: ι : Type ?u.20611
inst✝ : Fintype ι
I J : Box ι
c c₁ c₂ : ℝ≥0
r r₁ r₂ : (ι → ℝ) → ↑(Set.Ioi 0)
π π₁ π₂ : TaggedPrepartition I
l l₁ l₂ : IntegrationParams
⊢ Henstock ≤ McShane
Theorem: image_le_kernel
File: Mathlib/Algebra/Homology/ImageToKernel.lean

tactic: simp
state_before: ι : Type ?u.449
V : Type u
inst✝³ : Category V
inst✝² : HasZeroMorphisms V
A B C : V
f : A ⟶ B
inst✝¹ : HasImage f
g : B ⟶ C
inst✝ : HasKernel g
w : f ≫ g = 0
⊢ kernel.lift g f w ≫ kernel.ι g = f
Theorem: Ordinal.sup_eq_lsub_or_sup_succ_eq_lsub
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: cases' eq_or_lt_of_le (sup_le_lsub.{_, v} f) with h h
state_before: α : Type ?u.322539
β : Type ?u.322542
γ : Type ?u.322545
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u
f : ι → Ordinal
⊢ sup f = lsub f ∨ succ (sup f) = lsub f

tactic: exact Or.inl h
state_before: case inl
α : Type ?u.322539
β : Type ?u.322542
γ : Type ?u.322545
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u
f : ι → Ordinal
h : sup f = lsub f
⊢ sup f = lsub f ∨ succ (sup f) = lsub f

tactic: exact Or.inr ((succ_le_of_lt h).antisymm (lsub_le_sup_succ f))
state_before: case inr
α : Type ?u.322539
β : Type ?u.322542
γ : Type ?u.322545
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u
f : ι → Ordinal
h : sup f < lsub f
⊢ sup f = lsub f ∨ succ (sup f) = lsub f
Theorem: Function.Periodic.compact_of_continuous
File: Mathlib/Topology/Instances/Real.lean

tactic: rw [← hp.image_uIcc hc 0]
state_before: α : Type u
β : Type v
γ : Type w
inst✝ : TopologicalSpace α
f : ℝ → α
c : ℝ
hp : Periodic f c
hc : c ≠ 0
hf : Continuous f
⊢ IsCompact (range f)

tactic: exact isCompact_uIcc.image hf
state_before: α : Type u
β : Type v
γ : Type w
inst✝ : TopologicalSpace α
f : ℝ → α
c : ℝ
hp : Periodic f c
hc : c ≠ 0
hf : Continuous f
⊢ IsCompact (f '' [[0, 0 + c]])
Theorem: Int.mem_zmultiples_iff
File: Mathlib/GroupTheory/Subgroup/ZPowers.lean

tactic: rw [mul_comm, eq_comm, ← smul_eq_mul]
state_before: G : Type ?u.32208
inst✝² : Group G
A : Type ?u.32214
inst✝¹ : AddGroup A
N : Type ?u.32220
inst✝ : Group N
a b k : ℤ
⊢ (fun x => x • a) k = b ↔ b = a * k
Theorem: MeasureTheory.Measure.prod_sum
File: Mathlib/MeasureTheory/Constructions/Prod/Basic.lean

tactic: refine' prod_eq fun s t hs ht => _
state_before: α : Type u_3
α' : Type ?u.4493903
β : Type u_2
β' : Type ?u.4493909
γ : Type ?u.4493912
E : Type ?u.4493915
inst✝⁹ : MeasurableSpace α
inst✝⁸ : MeasurableSpace α'
inst✝⁷ : MeasurableSpace β
inst✝⁶ : MeasurableSpace β'
inst✝⁵ : MeasurableSpace γ
μ μ' : Measure α
ν✝ ν' : Measure β
τ : Measure γ
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SigmaFinite ν✝
inst✝² : SigmaFinite μ
ι : Type u_1
inst✝¹ : Finite ι
ν : ι → Measure β
inst✝ : ∀ (i : ι), SigmaFinite (ν i)
⊢ Measure.prod μ (sum ν) = sum fun i => Measure.prod μ (ν i)

tactic: simp_rw [sum_apply _ (hs.prod ht), sum_apply _ ht, prod_prod, ENNReal.tsum_mul_left]
state_before: α : Type u_3
α' : Type ?u.4493903
β : Type u_2
β' : Type ?u.4493909
γ : Type ?u.4493912
E : Type ?u.4493915
inst✝⁹ : MeasurableSpace α
inst✝⁸ : MeasurableSpace α'
inst✝⁷ : MeasurableSpace β
inst✝⁶ : MeasurableSpace β'
inst✝⁵ : MeasurableSpace γ
μ μ' : Measure α
ν✝ ν' : Measure β
τ : Measure γ
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SigmaFinite ν✝
inst✝² : SigmaFinite μ
ι : Type u_1
inst✝¹ : Finite ι
ν : ι → Measure β
inst✝ : ∀ (i : ι), SigmaFinite (ν i)
s : Set α
t : Set β
hs : MeasurableSet s
ht : MeasurableSet t
⊢ ↑↑(sum fun i => Measure.prod μ (ν i)) (s ×ˢ t) = ↑↑μ s * ↑↑(sum ν) t
Theorem: MeasureTheory.FinMeasAdditive.zero
File: Mathlib/MeasureTheory/Integral/SetToL1.lean

tactic: simp
state_before: α : Type u_1
E : Type ?u.12375
F : Type ?u.12378
F' : Type ?u.12381
G : Type ?u.12384
𝕜 : Type ?u.12387
p : ℝ≥0∞
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace ℝ F'
inst✝¹ : NormedAddCommGroup G
m : MeasurableSpace α
μ : Measure α
β : Type u_2
inst✝ : AddCommMonoid β
T T' : Set α → β
s t : Set α
x✝⁴ : MeasurableSet s
x✝³ : MeasurableSet t
x✝² : ↑↑μ s ≠ ⊤
x✝¹ : ↑↑μ t ≠ ⊤
x✝ : s ∩ t = ∅
⊢ OfNat.ofNat 0 (s ∪ t) = OfNat.ofNat 0 s + OfNat.ofNat 0 t
Theorem: SemiconjBy.sub_right
File: Mathlib/Algebra/Ring/Semiconj.lean

tactic: simpa only [sub_eq_add_neg] using h.add_right h'.neg_right
state_before: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝ : NonUnitalNonAssocRing R
a b x y x' y' : R
h : SemiconjBy a x y
h' : SemiconjBy a x' y'
⊢ SemiconjBy a (x - x') (y - y')
Theorem: PNat.factorMultiset_pow
File: Mathlib/Data/PNat/Factors.lean

tactic: let u := factorMultiset n
state_before: n : ℕ+
m : ℕ
⊢ factorMultiset (Pow.pow n m) = m • factorMultiset n

tactic: have : n = u.prod := (prod_factorMultiset n).symm
state_before: n : ℕ+
m : ℕ
u : PrimeMultiset := factorMultiset n
⊢ factorMultiset (Pow.pow n m) = m • factorMultiset n

tactic: rw [this, ← PrimeMultiset.prod_smul]
state_before: n : ℕ+
m : ℕ
u : PrimeMultiset := factorMultiset n
this : n = PrimeMultiset.prod u
⊢ factorMultiset (Pow.pow n m) = m • factorMultiset n

tactic: repeat' rw [PrimeMultiset.factorMultiset_prod]
state_before: n : ℕ+
m : ℕ
u : PrimeMultiset := factorMultiset n
this : n = PrimeMultiset.prod u
⊢ factorMultiset (PrimeMultiset.prod (m • u)) = m • factorMultiset (PrimeMultiset.prod u)

tactic: rw [PrimeMultiset.factorMultiset_prod]
state_before: n : ℕ+
m : ℕ
u : PrimeMultiset := factorMultiset n
this : n = PrimeMultiset.prod u
⊢ m • u = m • factorMultiset (PrimeMultiset.prod u)
Theorem: MeasureTheory.OuterMeasure.map_iInf_comap
File: Mathlib/MeasureTheory/Measure/OuterMeasure.lean

tactic: refine' (map_iInf_le _ _).antisymm fun s => _
state_before: α : Type u_3
ι : Sort u_1
β : Type u_2
inst✝ : Nonempty ι
f : α → β
m : ι → OuterMeasure β
⊢ ↑(map f) (⨅ (i : ι), ↑(comap f) (m i)) = ⨅ (i : ι), ↑(map f) (↑(comap f) (m i))

tactic: simp only [map_apply, comap_apply, iInf_apply, le_iInf_iff]
state_before: α : Type u_3
ι : Sort u_1
β : Type u_2
inst✝ : Nonempty ι
f : α → β
m : ι → OuterMeasure β
s : Set β
⊢ ↑(⨅ (i : ι), ↑(map f) (↑(comap f) (m i))) s ≤ ↑(↑(map f) (⨅ (i : ι), ↑(comap f) (m i))) s

tactic: refine' fun t ht => iInf_le_of_le (fun n => f '' t n ∪ range fᶜ) (iInf_le_of_le _ _)
state_before: α : Type u_3
ι : Sort u_1
β : Type u_2
inst✝ : Nonempty ι
f : α → β
m : ι → OuterMeasure β
s : Set β
⊢ ∀ (i : ℕ → Set α),
    f ⁻¹' s ⊆ iUnion i →
      (⨅ (t : ℕ → Set β) (_ : s ⊆ iUnion t), ∑' (n : ℕ), ⨅ (i : ι), ↑(m i) (f '' (f ⁻¹' t n))) ≤
        ∑' (n : ℕ), ⨅ (i_2 : ι), ↑(m i_2) (f '' i n)

tactic: rw [← iUnion_union, Set.union_comm, ← inter_subset, ← image_iUnion, ←
  image_preimage_eq_inter_range]
state_before: case refine'_1
α : Type u_3
ι : Sort u_1
β : Type u_2
inst✝ : Nonempty ι
f : α → β
m : ι → OuterMeasure β
s : Set β
t : ℕ → Set α
ht : f ⁻¹' s ⊆ iUnion t
⊢ s ⊆ ⋃ (n : ℕ), f '' t n ∪ range fᶜ

tactic: exact image_subset _ ht
state_before: case refine'_1
α : Type u_3
ι : Sort u_1
β : Type u_2
inst✝ : Nonempty ι
f : α → β
m : ι → OuterMeasure β
s : Set β
t : ℕ → Set α
ht : f ⁻¹' s ⊆ iUnion t
⊢ f '' (f ⁻¹' s) ⊆ f '' ⋃ (i : ℕ), t i

tactic: refine' ENNReal.tsum_le_tsum fun n => iInf_mono fun i => (m i).mono _
state_before: case refine'_2
α : Type u_3
ι : Sort u_1
β : Type u_2
inst✝ : Nonempty ι
f : α → β
m : ι → OuterMeasure β
s : Set β
t : ℕ → Set α
ht : f ⁻¹' s ⊆ iUnion t
⊢ (∑' (n : ℕ), ⨅ (i : ι), ↑(m i) (f '' (f ⁻¹' (fun n => f '' t n ∪ range fᶜ) n))) ≤
    ∑' (n : ℕ), ⨅ (i : ι), ↑(m i) (f '' t n)

tactic: simp
state_before: case refine'_2
α : Type u_3
ι : Sort u_1
β : Type u_2
inst✝ : Nonempty ι
f : α → β
m : ι → OuterMeasure β
s : Set β
t : ℕ → Set α
ht : f ⁻¹' s ⊆ iUnion t
n : ℕ
i : ι
⊢ f '' (f ⁻¹' (fun n => f '' t n ∪ range fᶜ) n) ⊆ f '' t n

tactic: exact subset_refl _
state_before: case refine'_2
α : Type u_3
ι : Sort u_1
β : Type u_2
inst✝ : Nonempty ι
f : α → β
m : ι → OuterMeasure β
s : Set β
t : ℕ → Set α
ht : f ⁻¹' s ⊆ iUnion t
n : ℕ
i : ι
⊢ f ⁻¹' (f '' t n) ⊆ f ⁻¹' (f '' t n)
Theorem: Nat.Prime.multiplicity_choose_prime_pow_add_multiplicity
File: Mathlib/Data/Nat/Multiplicity.lean

tactic: have hdisj :
  Disjoint ((Ico 1 n.succ).filter fun i => p ^ i ≤ k % p ^ i + (p ^ n - k) % p ^ i)
    ((Ico 1 n.succ).filter fun i => p ^ i ∣ k) := by
  simp (config := { contextual := true }) [disjoint_right, *, dvd_iff_mod_eq_zero,
    Nat.mod_lt _ (pow_pos hp.pos _)]
state_before: p n k : ℕ
hp : Prime p
hkn : k ≤ p ^ n
hk0 : k ≠ 0
⊢ multiplicity p (choose (p ^ n) k) + multiplicity p k ≤ ↑n

tactic: rw [multiplicity_choose hp hkn (lt_succ_self _),
  multiplicity_eq_card_pow_dvd (ne_of_gt hp.one_lt) hk0.bot_lt
    (lt_succ_of_le (log_mono_right hkn)),
  ← Nat.cast_add, PartENat.coe_le_coe, log_pow hp.one_lt, ← card_disjoint_union hdisj,
  filter_union_right]
state_before: p n k : ℕ
hp : Prime p
hkn : k ≤ p ^ n
hk0 : k ≠ 0
hdisj :
  Disjoint (filter (fun i => p ^ i ≤ k % p ^ i + (p ^ n - k) % p ^ i) (Ico 1 (succ n)))
    (filter (fun i => p ^ i ∣ k) (Ico 1 (succ n)))
⊢ multiplicity p (choose (p ^ n) k) + multiplicity p k ≤ ↑n

tactic: have filter_le_Ico := (Ico 1 n.succ).card_filter_le
  fun x => p ^ x ≤ k % p ^ x + (p ^ n - k) % p ^ x ∨ p ^ x ∣ k
state_before: p n k : ℕ
hp : Prime p
hkn : k ≤ p ^ n
hk0 : k ≠ 0
hdisj :
  Disjoint (filter (fun i => p ^ i ≤ k % p ^ i + (p ^ n - k) % p ^ i) (Ico 1 (succ n)))
    (filter (fun i => p ^ i ∣ k) (Ico 1 (succ n)))
⊢ card (filter (fun x => p ^ x ≤ k % p ^ x + (p ^ n - k) % p ^ x ∨ p ^ x ∣ k) (Ico 1 (succ n))) ≤ n

tactic: rwa [card_Ico 1 n.succ] at filter_le_Ico
state_before: p n k : ℕ
hp : Prime p
hkn : k ≤ p ^ n
hk0 : k ≠ 0
hdisj :
  Disjoint (filter (fun i => p ^ i ≤ k % p ^ i + (p ^ n - k) % p ^ i) (Ico 1 (succ n)))
    (filter (fun i => p ^ i ∣ k) (Ico 1 (succ n)))
filter_le_Ico :
  card (filter (fun x => p ^ x ≤ k % p ^ x + (p ^ n - k) % p ^ x ∨ p ^ x ∣ k) (Ico 1 (succ n))) ≤ card (Ico 1 (succ n))
⊢ card (filter (fun x => p ^ x ≤ k % p ^ x + (p ^ n - k) % p ^ x ∨ p ^ x ∣ k) (Ico 1 (succ n))) ≤ n

tactic: simp (config := { contextual := true }) [disjoint_right, *, dvd_iff_mod_eq_zero,
  Nat.mod_lt _ (pow_pos hp.pos _)]
state_before: p n k : ℕ
hp : Prime p
hkn : k ≤ p ^ n
hk0 : k ≠ 0
⊢ Disjoint (filter (fun i => p ^ i ≤ k % p ^ i + (p ^ n - k) % p ^ i) (Ico 1 (succ n)))
    (filter (fun i => p ^ i ∣ k) (Ico 1 (succ n)))

tactic: rw [← hp.multiplicity_pow_self]
state_before: p n k : ℕ
hp : Prime p
hkn : k ≤ p ^ n
hk0 : k ≠ 0
⊢ ↑n ≤ multiplicity p (choose (p ^ n) k) + multiplicity p k

tactic: exact multiplicity_le_multiplicity_choose_add hp _ _
state_before: p n k : ℕ
hp : Prime p
hkn : k ≤ p ^ n
hk0 : k ≠ 0
⊢ multiplicity p (p ^ n) ≤ multiplicity p (choose (p ^ n) k) + multiplicity p k
Theorem: Polynomial.base_mul_mem_lifts
File: Mathlib/Data/Polynomial/Lifts.lean

tactic: simp only [lifts, RingHom.mem_rangeS] at hp⊢
state_before: R : Type u
inst✝¹ : Semiring R
S : Type v
inst✝ : Semiring S
f : R →+* S
p : S[X]
r : R
hp : p ∈ lifts f
⊢ ↑C (↑f r) * p ∈ lifts f

tactic: obtain ⟨p₁, rfl⟩ := hp
state_before: R : Type u
inst✝¹ : Semiring R
S : Type v
inst✝ : Semiring S
f : R →+* S
p : S[X]
r : R
hp : ∃ x, ↑(mapRingHom f) x = p
⊢ ∃ x, ↑(mapRingHom f) x = ↑C (↑f r) * p

tactic: use C r * p₁
state_before: case intro
R : Type u
inst✝¹ : Semiring R
S : Type v
inst✝ : Semiring S
f : R →+* S
r : R
p₁ : R[X]
⊢ ∃ x, ↑(mapRingHom f) x = ↑C (↑f r) * ↑(mapRingHom f) p₁

tactic: simp only [coe_mapRingHom, map_C, map_mul]
state_before: case intro
R : Type u
inst✝¹ : Semiring R
S : Type v
inst✝ : Semiring S
f : R →+* S
r : R
p₁ : R[X]
⊢ ↑(mapRingHom f) (↑C r * p₁) = ↑C (↑f r) * ↑(mapRingHom f) p₁
Theorem: Dfinsupp.subset_mapRange_neLocus
File: Mathlib/Data/Dfinsupp/NeLocus.lean

tactic: simpa only [mem_neLocus, mapRange_apply, not_imp_not] using congr_arg (F a)
state_before: α : Type u_3
N : α → Type u_1
inst✝⁵ : DecidableEq α
M : α → Type u_2
P : α → Type ?u.12530
inst✝⁴ : (a : α) → Zero (N a)
inst✝³ : (a : α) → Zero (M a)
inst✝² : (a : α) → Zero (P a)
inst✝¹ : (a : α) → DecidableEq (N a)
inst✝ : (a : α) → DecidableEq (M a)
f g : Π₀ (a : α), N a
F : (a : α) → N a → M a
F0 : ∀ (a : α), F a 0 = 0
a : α
⊢ a ∈ neLocus (mapRange F F0 f) (mapRange F F0 g) → a ∈ neLocus f g
Theorem: norm_add_sq_eq_norm_sq_add_norm_sq_iff_real_inner_eq_zero
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: rw [@norm_add_mul_self ℝ, add_right_cancel_iff, add_right_eq_self, mul_eq_zero]
state_before: 𝕜 : Type ?u.3103380
E : Type ?u.3103383
F : Type u_1
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x y : F
⊢ ‖x + y‖ * ‖x + y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ ↔ inner x y = 0

tactic: norm_num
state_before: 𝕜 : Type ?u.3103380
E : Type ?u.3103383
F : Type u_1
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x y : F
⊢ 2 = 0 ∨ ↑re (inner x y) = 0 ↔ inner x y = 0
Theorem: hasSum_le_inj
File: Mathlib/Topology/Algebra/InfiniteSum/Order.lean

tactic: rw [← hasSum_extend_zero he] at hf
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
inst✝² : OrderedAddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
f g✝ : ι → α
a a₁ a₂ : α
g : κ → α
e : ι → κ
he : Injective e
hs : ∀ (c : κ), ¬c ∈ Set.range e → 0 ≤ g c
h : ∀ (i : ι), f i ≤ g (e i)
hf : HasSum f a₁
hg : HasSum g a₂
⊢ a₁ ≤ a₂

tactic: refine hasSum_le (fun c => ?_) hf hg
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
inst✝² : OrderedAddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
f g✝ : ι → α
a a₁ a₂ : α
g : κ → α
e : ι → κ
he : Injective e
hs : ∀ (c : κ), ¬c ∈ Set.range e → 0 ≤ g c
h : ∀ (i : ι), f i ≤ g (e i)
hf : HasSum (extend e f 0) a₁
hg : HasSum g a₂
⊢ a₁ ≤ a₂

tactic: obtain ⟨i, rfl⟩ | h := em (c ∈ Set.range e)
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
inst✝² : OrderedAddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
f g✝ : ι → α
a a₁ a₂ : α
g : κ → α
e : ι → κ
he : Injective e
hs : ∀ (c : κ), ¬c ∈ Set.range e → 0 ≤ g c
h : ∀ (i : ι), f i ≤ g (e i)
hf : HasSum (extend e f 0) a₁
hg : HasSum g a₂
c : κ
⊢ extend e f 0 c ≤ g c

tactic: rw [he.extend_apply]
state_before: case inl.intro
ι : Type u_1
κ : Type u_2
α : Type u_3
inst✝² : OrderedAddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
f g✝ : ι → α
a a₁ a₂ : α
g : κ → α
e : ι → κ
he : Injective e
hs : ∀ (c : κ), ¬c ∈ Set.range e → 0 ≤ g c
h : ∀ (i : ι), f i ≤ g (e i)
hf : HasSum (extend e f 0) a₁
hg : HasSum g a₂
i : ι
⊢ extend e f 0 (e i) ≤ g (e i)

tactic: exact h _
state_before: case inl.intro
ι : Type u_1
κ : Type u_2
α : Type u_3
inst✝² : OrderedAddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
f g✝ : ι → α
a a₁ a₂ : α
g : κ → α
e : ι → κ
he : Injective e
hs : ∀ (c : κ), ¬c ∈ Set.range e → 0 ≤ g c
h : ∀ (i : ι), f i ≤ g (e i)
hf : HasSum (extend e f 0) a₁
hg : HasSum g a₂
i : ι
⊢ f i ≤ g (e i)

tactic: rw [extend_apply' _ _ _ h]
state_before: case inr
ι : Type u_1
κ : Type u_2
α : Type u_3
inst✝² : OrderedAddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
f g✝ : ι → α
a a₁ a₂ : α
g : κ → α
e : ι → κ
he : Injective e
hs : ∀ (c : κ), ¬c ∈ Set.range e → 0 ≤ g c
h✝ : ∀ (i : ι), f i ≤ g (e i)
hf : HasSum (extend e f 0) a₁
hg : HasSum g a₂
c : κ
h : ¬c ∈ Set.range e
⊢ extend e f 0 c ≤ g c

tactic: exact hs _ h
state_before: case inr
ι : Type u_1
κ : Type u_2
α : Type u_3
inst✝² : OrderedAddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
f g✝ : ι → α
a a₁ a₂ : α
g : κ → α
e : ι → κ
he : Injective e
hs : ∀ (c : κ), ¬c ∈ Set.range e → 0 ≤ g c
h✝ : ∀ (i : ι), f i ≤ g (e i)
hf : HasSum (extend e f 0) a₁
hg : HasSum g a₂
c : κ
h : ¬c ∈ Set.range e
⊢ OfNat.ofNat 0 c ≤ g c
Theorem: Commute.invOf_left
File: Mathlib/Algebra/Invertible.lean

tactic: simp [mul_assoc]
state_before: α : Type u
inst✝¹ : Monoid α
a b : α
inst✝ : Invertible b
h : Commute b a
⊢ ⅟b * a = ⅟b * (a * b * ⅟b)

tactic: rw [h.eq]
state_before: α : Type u
inst✝¹ : Monoid α
a b : α
inst✝ : Invertible b
h : Commute b a
⊢ ⅟b * (a * b * ⅟b) = ⅟b * (b * a * ⅟b)

tactic: simp [mul_assoc]
state_before: α : Type u
inst✝¹ : Monoid α
a b : α
inst✝ : Invertible b
h : Commute b a
⊢ ⅟b * (b * a * ⅟b) = a * ⅟b
Theorem: List.sublistsLenAux_zero
File: Mathlib/Data/List/Sublists.lean

tactic: cases l <;> rfl
state_before: α✝ : Type u
β : Type v
γ : Type w
α : Type u_1
l : List α
f : List α → β
r : List β
⊢ sublistsLenAux 0 l f r = f [] :: r
Theorem: SimpleGraph.Subgraph.IsMatching.even_card
File: Mathlib/Combinatorics/SimpleGraph/Matching.lean

tactic: classical
rw [isMatching_iff_forall_degree] at h
use M.coe.edgeFinset.card
rw [← two_mul, ← M.coe.sum_degrees_eq_twice_card_edges]
convert_to _ = Finset.sum Finset.univ fun v => SimpleGraph.degree (Subgraph.coe M) v using 3
simp [h, Finset.card_univ]
state_before: V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
inst✝ : Fintype ↑M.verts
h : IsMatching M
⊢ Even (Finset.card (Set.toFinset M.verts))

tactic: rw [isMatching_iff_forall_degree] at h
state_before: V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
inst✝ : Fintype ↑M.verts
h : IsMatching M
⊢ Even (Finset.card (Set.toFinset M.verts))

tactic: use M.coe.edgeFinset.card
state_before: V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
inst✝ : Fintype ↑M.verts
h✝ : IsMatching M
h : ∀ (v : V), v ∈ M.verts → degree M v = 1
⊢ Even (Finset.card (Set.toFinset M.verts))

tactic: rw [← two_mul, ← M.coe.sum_degrees_eq_twice_card_edges]
state_before: V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
inst✝ : Fintype ↑M.verts
h✝ : IsMatching M
h : ∀ (v : V), v ∈ M.verts → degree M v = 1
⊢ Finset.card (Set.toFinset M.verts) =
    Finset.card (edgeFinset (Subgraph.coe M)) + Finset.card (edgeFinset (Subgraph.coe M))

tactic: convert_to _ = Finset.sum Finset.univ fun v => SimpleGraph.degree (Subgraph.coe M) v using 3
state_before: V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
inst✝ : Fintype ↑M.verts
h✝ : IsMatching M
h : ∀ (v : V), v ∈ M.verts → degree M v = 1
⊢ Finset.card (Set.toFinset M.verts) = Finset.sum Finset.univ fun v => SimpleGraph.degree (Subgraph.coe M) v

tactic: simp [h, Finset.card_univ]
state_before: V : Type u
G : SimpleGraph V
M✝ M : Subgraph G
inst✝ : Fintype ↑M.verts
h✝ : IsMatching M
h : ∀ (v : V), v ∈ M.verts → degree M v = 1
⊢ Finset.card (Set.toFinset M.verts) = Finset.sum Finset.univ fun v => SimpleGraph.degree (Subgraph.coe M) v
Theorem: Rat.uniformContinuous_neg
File: Mathlib/Topology/Instances/Rat.lean

tactic: rw [dist_comm] at h
state_before: ε : ℝ
ε0 : ε > 0
a✝ b✝ : ℚ
h : dist a✝ b✝ < ε
⊢ dist (-a✝) (-b✝) < ε

tactic: simpa only [dist_eq, cast_neg, neg_sub_neg] using h
state_before: ε : ℝ
ε0 : ε > 0
a✝ b✝ : ℚ
h : dist b✝ a✝ < ε
⊢ dist (-a✝) (-b✝) < ε