tasksource/leandojo huggingface dataset:
Theorem: Nat.div_le_of_le_mul
File: Std/Data/Nat/Lemmas.lean

tactic: simp [Nat.div_zero, n.zero_le]
state_before: m n : Nat
x✝ : m ≤ 0 * n
⊢ m / 0 ≤ n

tactic: suffices succ k * (m / succ k) ≤ succ k * n from
  Nat.le_of_mul_le_mul_left this (zero_lt_succ _)
state_before: m n k : Nat
h : m ≤ succ k * n
⊢ m / succ k ≤ n

tactic: have h1 : succ k * (m / succ k) ≤ m % succ k + succ k * (m / succ k) := Nat.le_add_left _ _
state_before: m n k : Nat
h : m ≤ succ k * n
⊢ succ k * (m / succ k) ≤ succ k * n

tactic: have h2 : m % succ k + succ k * (m / succ k) = m := by rw [mod_add_div]
state_before: m n k : Nat
h : m ≤ succ k * n
h1 : succ k * (m / succ k) ≤ m % succ k + succ k * (m / succ k)
⊢ succ k * (m / succ k) ≤ succ k * n

tactic: have h3 : m ≤ succ k * n := h
state_before: m n k : Nat
h : m ≤ succ k * n
h1 : succ k * (m / succ k) ≤ m % succ k + succ k * (m / succ k)
h2 : m % succ k + succ k * (m / succ k) = m
⊢ succ k * (m / succ k) ≤ succ k * n

tactic: rw [← h2] at h3
state_before: m n k : Nat
h : m ≤ succ k * n
h1 : succ k * (m / succ k) ≤ m % succ k + succ k * (m / succ k)
h2 : m % succ k + succ k * (m / succ k) = m
h3 : m ≤ succ k * n
⊢ succ k * (m / succ k) ≤ succ k * n

tactic: exact Nat.le_trans h1 h3
state_before: m n k : Nat
h : m ≤ succ k * n
h1 : succ k * (m / succ k) ≤ m % succ k + succ k * (m / succ k)
h2 : m % succ k + succ k * (m / succ k) = m
h3 : m % succ k + succ k * (m / succ k) ≤ succ k * n
⊢ succ k * (m / succ k) ≤ succ k * n

tactic: rw [mod_add_div]
state_before: m n k : Nat
h : m ≤ succ k * n
h1 : succ k * (m / succ k) ≤ m % succ k + succ k * (m / succ k)
⊢ m % succ k + succ k * (m / succ k) = m
Theorem: Polynomial.reverse_natDegree
File: Mathlib/Data/Polynomial/Reverse.lean

tactic: rw [f.natDegree_eq_reverse_natDegree_add_natTrailingDegree, add_tsub_cancel_right]
state_before: R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
⊢ natDegree (reverse f) = natDegree f - natTrailingDegree f
Theorem: exists_lt_of_lt_ciSup'
File: Mathlib/Order/ConditionallyCompleteLattice/Basic.lean

tactic: contrapose! h
state_before: α : Type u_1
β : Type ?u.83930
γ : Type ?u.83933
ι : Sort u_2
inst✝ : ConditionallyCompleteLinearOrderBot α
f : ι → α
a : α
h : a < ⨆ (i : ι), f i
⊢ ∃ i, a < f i

tactic: exact ciSup_le' h
state_before: α : Type u_1
β : Type ?u.83930
γ : Type ?u.83933
ι : Sort u_2
inst✝ : ConditionallyCompleteLinearOrderBot α
f : ι → α
a : α
h : ∀ (i : ι), f i ≤ a
⊢ (⨆ (i : ι), f i) ≤ a
Theorem: Std.AssocList.all_eq
File: Std/Data/AssocList.lean

tactic: induction l <;> simp [all, *]
state_before: α : Type u_1
β : Type u_2
p : α → β → Bool
l : AssocList α β
⊢ all p l =
    List.all (toList l) fun x =>
      match x with
      | (a, b) => p a b
Theorem: Bool.le_iff_imp
File: Mathlib/Data/Bool/Basic.lean

tactic: decide
state_before: ⊢ ∀ {x y : Bool}, x ≤ y ↔ x = true → y = true
Theorem: Polynomial.span_le_of_C_coeff_mem
File: Mathlib/Data/Polynomial/Induction.lean

tactic: simp (config := { singlePass := true }) only [@eq_comm _ _ (C _)]
state_before: R : Type u
S : Type v
T : Type w
ι : Type x
k : Type y
A : Type z
a b : R
m n : ℕ
inst✝ : Semiring R
p q r f : R[X]
I : Ideal R[X]
cf : ∀ (i : ℕ), ↑C (coeff f i) ∈ I
⊢ Ideal.span {g | ∃ i, g = ↑C (coeff f i)} ≤ I

tactic: exact (Ideal.span_le.trans range_subset_iff).mpr cf
state_before: R : Type u
S : Type v
T : Type w
ι : Type x
k : Type y
A : Type z
a b : R
m n : ℕ
inst✝ : Semiring R
p q r f : R[X]
I : Ideal R[X]
cf : ∀ (i : ℕ), ↑C (coeff f i) ∈ I
⊢ Ideal.span {g | ∃ i, ↑C (coeff f i) = g} ≤ I
Theorem: HasCompactSupport.mul_right
File: Mathlib/Topology/Support.lean

tactic: rw [hasCompactSupport_iff_eventuallyEq] at hf ⊢
state_before: X : Type ?u.29412
α : Type u_1
α' : Type ?u.29418
β : Type u_2
γ : Type ?u.29424
δ : Type ?u.29427
M : Type ?u.29430
E : Type ?u.29433
R : Type ?u.29436
inst✝¹ : TopologicalSpace α
inst✝ : MulZeroClass β
f f' : α → β
x : α
hf : HasCompactSupport f
⊢ HasCompactSupport (f * f')

tactic: refine' hf.mono fun x hx => by simp_rw [Pi.mul_apply, hx, Pi.zero_apply, zero_mul]
state_before: X : Type ?u.29412
α : Type u_1
α' : Type ?u.29418
β : Type u_2
γ : Type ?u.29424
δ : Type ?u.29427
M : Type ?u.29430
E : Type ?u.29433
R : Type ?u.29436
inst✝¹ : TopologicalSpace α
inst✝ : MulZeroClass β
f f' : α → β
x : α
hf : f =ᶠ[coclosedCompact α] 0
⊢ f * f' =ᶠ[coclosedCompact α] 0

tactic: simp_rw [Pi.mul_apply, hx, Pi.zero_apply, zero_mul]
state_before: X : Type ?u.29412
α : Type u_1
α' : Type ?u.29418
β : Type u_2
γ : Type ?u.29424
δ : Type ?u.29427
M : Type ?u.29430
E : Type ?u.29433
R : Type ?u.29436
inst✝¹ : TopologicalSpace α
inst✝ : MulZeroClass β
f f' : α → β
x✝ : α
hf : f =ᶠ[coclosedCompact α] 0
x : α
hx : f x = OfNat.ofNat 0 x
⊢ (f * f') x = OfNat.ofNat 0 x
Theorem: finSuccAboveEquiv_symm_apply_ne_last
File: Mathlib/Logic/Equiv/Fin.lean

tactic: rw [← Option.some_inj]
state_before: m n : ℕ
p : Fin (n + 1)
h : p ≠ Fin.last n
x : { x // x ≠ p }
⊢ ↑(OrderIso.symm (finSuccAboveEquiv p)) x = Fin.predAbove (Fin.castLT p (_ : ↑p < n)) ↑x

tactic: simpa [finSuccAboveEquiv, OrderIso.symm] using finSuccEquiv'_ne_last_apply h x.property
state_before: m n : ℕ
p : Fin (n + 1)
h : p ≠ Fin.last n
x : { x // x ≠ p }
⊢ some (↑(OrderIso.symm (finSuccAboveEquiv p)) x) = some (Fin.predAbove (Fin.castLT p (_ : ↑p < n)) ↑x)
Theorem: Valuation.comap_onQuot_eq
File: Mathlib/RingTheory/Valuation/Quotient.lean

tactic: rintro ⟨x⟩
state_before: R : Type u_1
Γ₀ : Type u_2
inst✝¹ : CommRing R
inst✝ : LinearOrderedCommMonoidWithZero Γ₀
v✝ : Valuation R Γ₀
J : Ideal R
v : Valuation (R ⧸ J) Γ₀
⊢ ∀ (r : R ⧸ J), ↑(onQuot (comap (Ideal.Quotient.mk J) v) (_ : J ≤ supp (comap (Ideal.Quotient.mk J) v))) r = ↑v r

tactic: rfl
state_before: case mk
R : Type u_1
Γ₀ : Type u_2
inst✝¹ : CommRing R
inst✝ : LinearOrderedCommMonoidWithZero Γ₀
v✝ : Valuation R Γ₀
J : Ideal R
v : Valuation (R ⧸ J) Γ₀
r✝ : R ⧸ J
x : R
⊢ ↑(onQuot (comap (Ideal.Quotient.mk J) v) (_ : J ≤ supp (comap (Ideal.Quotient.mk J) v))) (Quot.mk Setoid.r x) =
    ↑v (Quot.mk Setoid.r x)
Theorem: Rat.not_countably_generated_cocompact
File: Mathlib/Topology/Instances/RatLemmas.lean

tactic: intro H
state_before: p q : ℚ
s t : Set ℚ
⊢ ¬IsCountablyGenerated (cocompact ℚ)

tactic: rcases exists_seq_tendsto (cocompact ℚ ⊓ 𝓝 0) with ⟨x, hx⟩
state_before: p q : ℚ
s t : Set ℚ
H : IsCountablyGenerated (cocompact ℚ)
⊢ False

tactic: rw [tendsto_inf] at hx
state_before: case intro
p q : ℚ
s t : Set ℚ
H : IsCountablyGenerated (cocompact ℚ)
x : ℕ → ℚ
hx : Tendsto x atTop (cocompact ℚ ⊓ 𝓝 0)
⊢ False

tactic: rcases hx with ⟨hxc, hx0⟩
state_before: case intro
p q : ℚ
s t : Set ℚ
H : IsCountablyGenerated (cocompact ℚ)
x : ℕ → ℚ
hx : Tendsto x atTop (cocompact ℚ) ∧ Tendsto x atTop (𝓝 0)
⊢ False

tactic: obtain ⟨n, hn⟩ : ∃ n : ℕ, x n ∉ insert (0 : ℚ) (range x)
state_before: case intro.intro
p q : ℚ
s t : Set ℚ
H : IsCountablyGenerated (cocompact ℚ)
x : ℕ → ℚ
hxc : Tendsto x atTop (cocompact ℚ)
hx0 : Tendsto x atTop (𝓝 0)
⊢ False

tactic: exact (hxc.eventually hx0.isCompact_insert_range.compl_mem_cocompact).exists
state_before: p q : ℚ
s t : Set ℚ
H : IsCountablyGenerated (cocompact ℚ)
x : ℕ → ℚ
hxc : Tendsto x atTop (cocompact ℚ)
hx0 : Tendsto x atTop (𝓝 0)
⊢ ∃ n, ¬x n ∈ insert 0 (range x)

case intro.intro.intro
p q : ℚ
s t : Set ℚ
H : IsCountablyGenerated (cocompact ℚ)
x : ℕ → ℚ
hxc : Tendsto x atTop (cocompact ℚ)
hx0 : Tendsto x atTop (𝓝 0)
n : ℕ
hn : ¬x n ∈ insert 0 (range x)
⊢ False

tactic: exact hn (Or.inr ⟨n, rfl⟩)
state_before: case intro.intro.intro
p q : ℚ
s t : Set ℚ
H : IsCountablyGenerated (cocompact ℚ)
x : ℕ → ℚ
hxc : Tendsto x atTop (cocompact ℚ)
hx0 : Tendsto x atTop (𝓝 0)
n : ℕ
hn : ¬x n ∈ insert 0 (range x)
⊢ False
Theorem: AlgebraicTopology.DoldKan.QInfty_idem
File: Mathlib/AlgebraicTopology/DoldKan/PInfty.lean

tactic: ext n
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
⊢ QInfty ≫ QInfty = QInfty

tactic: exact QInfty_f_idem n
state_before: case h
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
n : ℕ
⊢ HomologicalComplex.Hom.f (QInfty ≫ QInfty) n = HomologicalComplex.Hom.f QInfty n
Theorem: Path.delayReflRight_one
File: Mathlib/Topology/Homotopy/HSpaces.lean

tactic: ext t
state_before: X : Type u
inst✝ : TopologicalSpace X
x y : X
γ : Path x y
⊢ delayReflRight 1 γ = γ

tactic: exact congr_arg γ (qRight_one_right t)
state_before: case a.h
X : Type u
inst✝ : TopologicalSpace X
x y : X
γ : Path x y
t : ↑I
⊢ ↑(delayReflRight 1 γ) t = ↑γ t
Theorem: EReal.sign_coe
File: Mathlib/Data/Real/EReal.lean

tactic: simp only [sign, OrderHom.coe_fun_mk, EReal.coe_pos, EReal.coe_neg']
state_before: x : ℝ
⊢ ↑sign ↑x = ↑sign x
Theorem: Nat.ArithmeticFunction.cardFactors_mul
File: Mathlib/NumberTheory/ArithmeticFunction.lean

tactic: rw [cardFactors_apply, cardFactors_apply, cardFactors_apply, ← Multiset.coe_card, ← factors_eq,
  UniqueFactorizationMonoid.normalizedFactors_mul m0 n0, factors_eq, factors_eq,
  Multiset.card_add, Multiset.coe_card, Multiset.coe_card]
state_before: R : Type ?u.553992
m n : ℕ
m0 : m ≠ 0
n0 : n ≠ 0
⊢ ↑Ω (m * n) = ↑Ω m + ↑Ω n
Theorem: dite_dite_comm
File: Mathlib/Logic/Basic.lean

tactic: rw [dif_neg (h p), dif_pos p]
state_before: α : Sort u_1
β : Sort ?u.40743
σ : α → Sort ?u.40739
f : α → β
P Q : Prop
inst✝¹ : Decidable P
inst✝ : Decidable Q
a b c : α
A : P → α
B✝ : ¬P → α
B : Q → α
C : ¬P → ¬Q → α
h : P → ¬Q
p : P
⊢ A p = if q : Q then B q else if p : P then A p else C p q

tactic: congr
state_before: α : Sort u_1
β : Sort ?u.40743
σ : α → Sort ?u.40739
f : α → β
P Q : Prop
inst✝¹ : Decidable P
inst✝ : Decidable Q
a b c : α
A : P → α
B✝ : ¬P → α
B : Q → α
C : ¬P → ¬Q → α
h : P → ¬Q
np : ¬P
⊢ (if q : Q then B q else C np q) = if q : Q then B q else if p : P then A p else C p q

tactic: funext _
state_before: case e_e
α : Sort u_1
β : Sort ?u.40743
σ : α → Sort ?u.40739
f : α → β
P Q : Prop
inst✝¹ : Decidable P
inst✝ : Decidable Q
a b c : α
A : P → α
B✝ : ¬P → α
B : Q → α
C : ¬P → ¬Q → α
h : P → ¬Q
np : ¬P
⊢ (fun q => C np q) = fun q => if p : P then A p else C p q

tactic: rw [dif_neg np]
state_before: case e_e.h
α : Sort u_1
β : Sort ?u.40743
σ : α → Sort ?u.40739
f : α → β
P Q : Prop
inst✝¹ : Decidable P
inst✝ : Decidable Q
a b c : α
A : P → α
B✝ : ¬P → α
B : Q → α
C : ¬P → ¬Q → α
h : P → ¬Q
np : ¬P
x✝ : ¬Q
⊢ C np x✝ = if p : P then A p else C p x✝
Theorem: Cardinal.aleph_succ
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: rw [aleph, add_succ, aleph'_succ, aleph]
state_before: o : Ordinal
⊢ aleph (succ o) = succ (aleph o)
Theorem: padicValRat.pow
File: Mathlib/NumberTheory/Padics/PadicVal.lean

tactic: induction k <;>
simp [*, padicValRat.mul hq (pow_ne_zero _ hq), _root_.pow_succ, add_mul, add_comm]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
q : ℚ
hq : q ≠ 0
k : ℕ
⊢ padicValRat p (q ^ k) = ↑k * padicValRat p q
Theorem: Real.map_exp_atBot
File: Mathlib/Analysis/SpecialFunctions/Exp.lean

tactic: rw [← coe_comp_expOrderIso, ← Filter.map_map, expOrderIso.map_atBot, ← map_coe_Ioi_atBot]
state_before: α : Type ?u.118493
x y z : ℝ
l : Filter α
⊢ Filter.map exp atBot = 𝓝[Set.Ioi 0] 0
Theorem: MvPolynomial.vars_sub_of_disjoint
File: Mathlib/Data/MvPolynomial/CommRing.lean

tactic: rw [← vars_neg q] at hpq
state_before: R : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommRing R
p q : MvPolynomial σ R
inst✝ : DecidableEq σ
hpq : Disjoint (vars p) (vars q)
⊢ vars (p - q) = vars p ∪ vars q

tactic: convert vars_add_of_disjoint hpq using 2 <;> simp [sub_eq_add_neg]
state_before: R : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommRing R
p q : MvPolynomial σ R
inst✝ : DecidableEq σ
hpq : Disjoint (vars p) (vars (-q))
⊢ vars (p - q) = vars p ∪ vars q
Theorem: Zsqrtd.nonneg_muld
File: Mathlib/NumberTheory/Zsqrtd/Basic.lean

tactic: simp only [muld_val, mul_neg]
state_before: d : ℕ
a : ℤ√↑d
ha✝ : Nonneg a
x y : ℕ
ha : Nonneg { re := ↑x, im := -↑y }
⊢ Nonneg (sqrtd * { re := ↑x, im := -↑y })

tactic: apply nonnegg_neg_pos.2
state_before: d : ℕ
a : ℤ√↑d
ha✝ : Nonneg a
x y : ℕ
ha : Nonneg { re := ↑x, im := -↑y }
⊢ Nonneg { re := -(↑d * ↑y), im := ↑x }

tactic: simpa [SqLe, mul_comm, mul_left_comm] using Nat.mul_le_mul_left d (nonnegg_pos_neg.1 ha)
state_before: d : ℕ
a : ℤ√↑d
ha✝ : Nonneg a
x y : ℕ
ha : Nonneg { re := ↑x, im := -↑y }
⊢ SqLe (d * y) 1 x d

tactic: simp only [muld_val]
state_before: d : ℕ
a : ℤ√↑d
ha✝ : Nonneg a
x y : ℕ
ha : Nonneg { re := -↑x, im := ↑y }
⊢ Nonneg (sqrtd * { re := -↑x, im := ↑y })

tactic: apply nonnegg_pos_neg.2
state_before: d : ℕ
a : ℤ√↑d
ha✝ : Nonneg a
x y : ℕ
ha : Nonneg { re := -↑x, im := ↑y }
⊢ Nonneg { re := ↑d * ↑y, im := -↑x }

tactic: simpa [SqLe, mul_comm, mul_left_comm] using Nat.mul_le_mul_left d (nonnegg_neg_pos.1 ha)
state_before: d : ℕ
a : ℤ√↑d
ha✝ : Nonneg a
x y : ℕ
ha : Nonneg { re := -↑x, im := ↑y }
⊢ SqLe x d (d * y) 1
Theorem: norm_add_mul_self
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: repeat' rw [← sq (M := ℝ)]
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.2369823
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x y : E
⊢ ‖x + y‖ * ‖x + y‖ = ‖x‖ * ‖x‖ + 2 * ↑re (inner x y) + ‖y‖ * ‖y‖

tactic: exact norm_add_sq _ _
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.2369823
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x y : E
⊢ ‖x + y‖ ^ 2 = ‖x‖ ^ 2 + 2 * ↑re (inner x y) + ‖y‖ ^ 2

tactic: rw [← sq (M := ℝ)]
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.2369823
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x y : E
⊢ ‖x + y‖ ^ 2 = ‖x‖ ^ 2 + 2 * ↑re (inner x y) + ‖y‖ ^ 2
Theorem: Finset.disjSups_singleton
File: Mathlib/Data/Finset/Sups.lean

tactic: split_ifs with h <;> simp [disjSups, filter_singleton, h]
state_before: α : Type u_1
inst✝³ : DecidableEq α
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
⊢ {a} ○ {b} = if Disjoint a b then {a ⊔ b} else ∅
Theorem: CircleDeg1Lift.map_lt_add_floor_translationNumber_add_one
File: Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean

tactic: rw [add_assoc]
state_before: f g : CircleDeg1Lift
x : ℝ
⊢ ↑f x < x + ↑⌊τ f⌋ + 1

tactic: norm_cast
state_before: f g : CircleDeg1Lift
x : ℝ
⊢ ↑f x < x + (↑⌊τ f⌋ + 1)

tactic: refine' map_lt_of_translationNumber_lt_int _ _ _
state_before: f g : CircleDeg1Lift
x : ℝ
⊢ ↑f x < x + ↑(⌊τ f⌋ + 1)

tactic: push_cast
state_before: f g : CircleDeg1Lift
x : ℝ
⊢ τ f < ↑(⌊τ f⌋ + 1)

tactic: exact lt_floor_add_one _
state_before: f g : CircleDeg1Lift
x : ℝ
⊢ τ f < ↑⌊τ f⌋ + 1
Theorem: Multiset.inr_mem_disjSum
File: Mathlib/Data/Multiset/Sum.lean

tactic: rw [mem_disjSum, or_iff_right]
state_before: α : Type u_2
β : Type u_1
s : Multiset α
t : Multiset β
s₁ s₂ : Multiset α
t₁ t₂ : Multiset β
a : α
b : β
x : α ⊕ β
⊢ inr b ∈ disjSum s t ↔ b ∈ t

tactic: simp only [inr.injEq, exists_eq_right]
state_before: α : Type u_2
β : Type u_1
s : Multiset α
t : Multiset β
s₁ s₂ : Multiset α
t₁ t₂ : Multiset β
a : α
b : β
x : α ⊕ β
⊢ (∃ b_1, b_1 ∈ t ∧ inr b_1 = inr b) ↔ b ∈ t

α : Type u_2
β : Type u_1
s : Multiset α
t : Multiset β
s₁ s₂ : Multiset α
t₁ t₂ : Multiset β
a : α
b : β
x : α ⊕ β
⊢ ¬∃ a, a ∈ s ∧ inl a = inr b

tactic: rintro ⟨a, _, ha⟩
state_before: α : Type u_2
β : Type u_1
s : Multiset α
t : Multiset β
s₁ s₂ : Multiset α
t₁ t₂ : Multiset β
a : α
b : β
x : α ⊕ β
⊢ ¬∃ a, a ∈ s ∧ inl a = inr b

tactic: exact inl_ne_inr ha
state_before: case intro.intro
α : Type u_2
β : Type u_1
s : Multiset α
t : Multiset β
s₁ s₂ : Multiset α
t₁ t₂ : Multiset β
a✝ : α
b : β
x : α ⊕ β
a : α
left✝ : a ∈ s
ha : inl a = inr b
⊢ False
Theorem: Ordnode.all_balanceL
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: rw [balanceL_eq_balance' hl hr sl sr H, all_balance']
state_before: α : Type u_1
P : α → Prop
l : Ordnode α
x : α
r : Ordnode α
hl : Balanced l
hr : Balanced r
sl : Sized l
sr : Sized r
H : (∃ l', Raised l' (size l) ∧ BalancedSz l' (size r)) ∨ ∃ r', Raised (size r) r' ∧ BalancedSz (size l) r'
⊢ All P (balanceL l x r) ↔ All P l ∧ P x ∧ All P r
Theorem: Fintype.card_embedding_eq
File: Mathlib/Data/Fintype/CardEmbedding.lean

tactic: rw [Subsingleton.elim emb Embedding.fintype]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Fintype α
inst✝ : Fintype β
emb : Fintype (α ↪ β)
⊢ ‖α ↪ β‖ = descFactorial ‖β‖ ‖α‖

tactic: refine' Fintype.induction_empty_option (P := fun t ↦ ‖t ↪ β‖ = ‖β‖.descFactorial ‖t‖)
      (fun α₁ α₂ h₂ e ih ↦ ?_) (?_) (fun γ h ih ↦ ?_) α <;> dsimp only <;> clear! α
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Fintype α
inst✝ : Fintype β
emb : Fintype (α ↪ β)
⊢ ‖α ↪ β‖ = descFactorial ‖β‖ ‖α‖

tactic: letI := Fintype.ofEquiv _ e.symm
state_before: case refine'_1
β : Type u_2
inst✝ : Fintype β
α₁ α₂ : Type u_1
h₂ : Fintype α₂
e : α₁ ≃ α₂
ih : (fun t [Fintype t] => ‖t ↪ β‖ = descFactorial ‖β‖ ‖t‖) α₁
⊢ ‖α₂ ↪ β‖ = descFactorial ‖β‖ ‖α₂‖

tactic: rw [← card_congr (Equiv.embeddingCongr e (Equiv.refl β)), ih, card_congr e]
state_before: case refine'_1
β : Type u_2
inst✝ : Fintype β
α₁ α₂ : Type u_1
h₂ : Fintype α₂
e : α₁ ≃ α₂
ih : (fun t [Fintype t] => ‖t ↪ β‖ = descFactorial ‖β‖ ‖t‖) α₁
this : Fintype α₁ := ofEquiv α₂ e.symm
⊢ ‖α₂ ↪ β‖ = descFactorial ‖β‖ ‖α₂‖

tactic: rw [card_pempty, Nat.descFactorial_zero, card_eq_one_iff]
state_before: case refine'_2
β : Type u_2
inst✝ : Fintype β
⊢ ‖PEmpty ↪ β‖ = descFactorial ‖β‖ ‖PEmpty‖

tactic: exact ⟨Embedding.ofIsEmpty, fun x ↦ FunLike.ext _ _ isEmptyElim⟩
state_before: case refine'_2
β : Type u_2
inst✝ : Fintype β
⊢ ∃ x, ∀ (y : PEmpty ↪ β), y = x

tactic: classical
dsimp only at ih
rw [card_option, Nat.descFactorial_succ, card_congr (Embedding.optionEmbeddingEquiv γ β),
    card_sigma, ←ih]
simp only [Fintype.card_compl_set, Fintype.card_range, Finset.sum_const, Finset.card_univ,
  smul_eq_mul, mul_comm]
state_before: case refine'_3
β : Type u_2
inst✝ : Fintype β
γ : Type u_1
h : Fintype γ
ih : (fun t [Fintype t] => ‖t ↪ β‖ = descFactorial ‖β‖ ‖t‖) γ
⊢ ‖Option γ ↪ β‖ = descFactorial ‖β‖ ‖Option γ‖

tactic: dsimp only at ih
state_before: case refine'_3
β : Type u_2
inst✝ : Fintype β
γ : Type u_1
h : Fintype γ
ih : (fun t [Fintype t] => ‖t ↪ β‖ = descFactorial ‖β‖ ‖t‖) γ
⊢ ‖Option γ ↪ β‖ = descFactorial ‖β‖ ‖Option γ‖

tactic: rw [card_option, Nat.descFactorial_succ, card_congr (Embedding.optionEmbeddingEquiv γ β),
    card_sigma, ←ih]
state_before: case refine'_3
β : Type u_2
inst✝ : Fintype β
γ : Type u_1
h : Fintype γ
ih : ‖γ ↪ β‖ = descFactorial ‖β‖ ‖γ‖
⊢ ‖Option γ ↪ β‖ = descFactorial ‖β‖ ‖Option γ‖

tactic: simp only [Fintype.card_compl_set, Fintype.card_range, Finset.sum_const, Finset.card_univ,
  smul_eq_mul, mul_comm]
state_before: case refine'_3
β : Type u_2
inst✝ : Fintype β
γ : Type u_1
h : Fintype γ
ih : ‖γ ↪ β‖ = descFactorial ‖β‖ ‖γ‖
⊢ ∑ a : γ ↪ β, ‖↑(Set.range ↑aᶜ)‖ = (‖β‖ - ‖γ‖) * ‖γ ↪ β‖
Theorem: slope_same
File: Mathlib/LinearAlgebra/AffineSpace/Slope.lean

tactic: rw [slope, sub_self, inv_zero, zero_smul]
state_before: k : Type u_2
E : Type u_1
PE : Type u_3
inst✝³ : Field k
inst✝² : AddCommGroup E
inst✝¹ : Module k E
inst✝ : AddTorsor E PE
f : k → PE
a : k
⊢ slope f a a = 0
Theorem: Function.id_le_iterate_of_id_le
File: Mathlib/Order/Iterate.lean

tactic: simpa only [iterate_id] using monotone_id.iterate_le_of_le h n
state_before: α : Type u_1
inst✝ : Preorder α
f : α → α
h : id ≤ f
n : ℕ
⊢ id ≤ f^[n]
Theorem: Real.hasSum_sin
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Series.lean

tactic: exact_mod_cast Complex.hasSum_sin r
state_before: r : ℝ
⊢ HasSum (fun n => (-1) ^ n * r ^ (2 * n + 1) / ↑(2 * n + 1)!) (sin r)
Theorem: Polynomial.coeff_sum
File: Mathlib/Data/Polynomial/Coeff.lean

tactic: rcases p with ⟨⟩
state_before: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝¹ : Semiring R
p q r : R[X]
inst✝ : Semiring S
n : ℕ
f : ℕ → R → S[X]
⊢ coeff (sum p f) n = sum p fun a b => coeff (f a b) n

tactic: simp [Polynomial.sum, support_ofFinsupp, coeff_ofFinsupp]
state_before: case ofFinsupp
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝¹ : Semiring R
q r : R[X]
inst✝ : Semiring S
n : ℕ
f : ℕ → R → S[X]
toFinsupp✝ : AddMonoidAlgebra R ℕ
⊢ coeff (sum { toFinsupp := toFinsupp✝ } f) n = sum { toFinsupp := toFinsupp✝ } fun a b => coeff (f a b) n
Theorem: smul_unitBall
File: Mathlib/Analysis/NormedSpace/Pointwise.lean

tactic: rw [_root_.smul_ball hc, smul_zero, mul_one]
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝² : NormedField 𝕜
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
c : 𝕜
hc : c ≠ 0
⊢ c • ball 0 1 = ball 0 ‖c‖
Theorem: List.inits_cons
File: Mathlib/Data/List/Infix.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.38861
l✝ l₁ l₂ l₃ : List α
a✝ b : α
m n : ℕ
a : α
l : List α
⊢ inits (a :: l) = [] :: map (fun t => a :: t) (inits l)
Theorem: Finite.isField_of_domain
File: Mathlib/RingTheory/IntegralDomain.lean

tactic: cases nonempty_fintype R
state_before: R✝ : Type ?u.39609
G : Type ?u.39612
inst✝⁵ : Ring R✝
inst✝⁴ : IsDomain R✝
inst✝³ : Fintype R✝
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : Finite R
⊢ IsField R

tactic: exact @Field.toIsField R (@Fintype.fieldOfDomain R _ _ (Classical.decEq R) _)
state_before: case intro
R✝ : Type ?u.39609
G : Type ?u.39612
inst✝⁵ : Ring R✝
inst✝⁴ : IsDomain R✝
inst✝³ : Fintype R✝
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : Finite R
val✝ : Fintype R
⊢ IsField R
Theorem: Filter.comap_pure
File: Mathlib/Order/Filter/Basic.lean

tactic: rw [← principal_singleton, comap_principal]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.247658
ι : Sort x
f f₁ f₂ : Filter α
g g₁ g₂ : Filter β
m : α → β
m' : β → γ
s : Set α
t : Set β
b : β
⊢ comap m (pure b) = 𝓟 (m ⁻¹' {b})
Theorem: Odd.neg
File: Mathlib/Algebra/Parity.lean

tactic: obtain ⟨k, hk⟩ := hp
state_before: F : Type ?u.101923
α : Type u_1
β : Type ?u.101929
R : Type ?u.101932
inst✝ : Ring α
a b : α
n : ℕ
hp : Odd a
⊢ Odd (-a)

tactic: use -(k + 1)
state_before: case intro
F : Type ?u.101923
α : Type u_1
β : Type ?u.101929
R : Type ?u.101932
inst✝ : Ring α
a b : α
n : ℕ
k : α
hk : a = 2 * k + 1
⊢ Odd (-a)

tactic: rw [mul_neg, mul_add, neg_add, add_assoc, two_mul (1 : α), neg_add, neg_add_cancel_right, ←
  neg_add, hk]
state_before: case intro
F : Type ?u.101923
α : Type u_1
β : Type ?u.101929
R : Type ?u.101932
inst✝ : Ring α
a b : α
n : ℕ
k : α
hk : a = 2 * k + 1
⊢ -a = 2 * -(k + 1) + 1
Theorem: tendstoLocallyUniformlyOn_iff_tendstoUniformlyOn_of_compact
File: Mathlib/Topology/UniformSpace/UniformConvergence.lean

tactic: haveI : CompactSpace s := isCompact_iff_compactSpace.mp hs
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝¹ : UniformSpace β
F : ι → α → β
f : α → β
s s' : Set α
x : α
p : Filter ι
p' : Filter α
g : ι → α
inst✝ : TopologicalSpace α
hs : IsCompact s
⊢ TendstoLocallyUniformlyOn F f p s ↔ TendstoUniformlyOn F f p s

tactic: refine' ⟨fun h => _, TendstoUniformlyOn.tendstoLocallyUniformlyOn⟩
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝¹ : UniformSpace β
F : ι → α → β
f : α → β
s s' : Set α
x : α
p : Filter ι
p' : Filter α
g : ι → α
inst✝ : TopologicalSpace α
hs : IsCompact s
this : CompactSpace ↑s
⊢ TendstoLocallyUniformlyOn F f p s ↔ TendstoUniformlyOn F f p s

tactic: rwa [tendstoLocallyUniformlyOn_iff_tendstoLocallyUniformly_comp_coe,
  tendstoLocallyUniformly_iff_tendstoUniformly_of_compactSpace, ←
  tendstoUniformlyOn_iff_tendstoUniformly_comp_coe] at h
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝¹ : UniformSpace β
F : ι → α → β
f : α → β
s s' : Set α
x : α
p : Filter ι
p' : Filter α
g : ι → α
inst✝ : TopologicalSpace α
hs : IsCompact s
this : CompactSpace ↑s
h : TendstoLocallyUniformlyOn F f p s
⊢ TendstoUniformlyOn F f p s
Theorem: RatFunc.num_one
File: Mathlib/FieldTheory/RatFunc.lean

tactic: convert num_div (1 : K[X]) 1 <;> simp
state_before: K : Type u
inst✝ : Field K
⊢ num 1 = 1
Theorem: Finpartition.energy_nonneg
File: Mathlib/Combinatorics/SimpleGraph/Regularity/Energy.lean

tactic: refine' div_nonneg (Finset.sum_nonneg fun _ _ => sq_nonneg _) <| Nat.cast_nonneg _
state_before: α : Type u_1
inst✝¹ : DecidableEq α
s : Finset α
P : Finpartition s
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
⊢ 0 ≤ energy P G