tasksource/leandojo huggingface dataset:
Theorem: Submodule.pow_toAddSubmonoid
File: Mathlib/Algebra/Algebra/Operations.lean

tactic: induction' n with n ih
state_before: ι : Sort uι
R : Type u
inst✝² : CommSemiring R
A : Type v
inst✝¹ : Semiring A
inst✝ : Algebra R A
S T : Set A
M N P Q : Submodule R A
m n✝ : A
n : ℕ
h : n ≠ 0
⊢ (M ^ n).toAddSubmonoid = M.toAddSubmonoid ^ n

tactic: exact (h rfl).elim
state_before: case zero
ι : Sort uι
R : Type u
inst✝² : CommSemiring R
A : Type v
inst✝¹ : Semiring A
inst✝ : Algebra R A
S T : Set A
M N P Q : Submodule R A
m n✝ : A
n : ℕ
h✝ : n ≠ 0
h : Nat.zero ≠ 0
⊢ (M ^ Nat.zero).toAddSubmonoid = M.toAddSubmonoid ^ Nat.zero

tactic: rw [pow_succ, pow_succ, mul_toAddSubmonoid]
state_before: case succ
ι : Sort uι
R : Type u
inst✝² : CommSemiring R
A : Type v
inst✝¹ : Semiring A
inst✝ : Algebra R A
S T : Set A
M N P Q : Submodule R A
m n✝¹ : A
n✝ : ℕ
h✝ : n✝ ≠ 0
n : ℕ
ih : n ≠ 0 → (M ^ n).toAddSubmonoid = M.toAddSubmonoid ^ n
h : Nat.succ n ≠ 0
⊢ (M ^ Nat.succ n).toAddSubmonoid = M.toAddSubmonoid ^ Nat.succ n

tactic: cases n with
| zero => rw [pow_zero, pow_zero, mul_one, ← mul_toAddSubmonoid, mul_one]
| succ n => rw [ih n.succ_ne_zero]
state_before: case succ
ι : Sort uι
R : Type u
inst✝² : CommSemiring R
A : Type v
inst✝¹ : Semiring A
inst✝ : Algebra R A
S T : Set A
M N P Q : Submodule R A
m n✝¹ : A
n✝ : ℕ
h✝ : n✝ ≠ 0
n : ℕ
ih : n ≠ 0 → (M ^ n).toAddSubmonoid = M.toAddSubmonoid ^ n
h : Nat.succ n ≠ 0
⊢ M.toAddSubmonoid * (M ^ n).toAddSubmonoid = M.toAddSubmonoid * M.toAddSubmonoid ^ n

tactic: rw [pow_zero, pow_zero, mul_one, ← mul_toAddSubmonoid, mul_one]
state_before: case succ.zero
ι : Sort uι
R : Type u
inst✝² : CommSemiring R
A : Type v
inst✝¹ : Semiring A
inst✝ : Algebra R A
S T : Set A
M N P Q : Submodule R A
m n✝ : A
n : ℕ
h✝ : n ≠ 0
ih : Nat.zero ≠ 0 → (M ^ Nat.zero).toAddSubmonoid = M.toAddSubmonoid ^ Nat.zero
h : Nat.succ Nat.zero ≠ 0
⊢ M.toAddSubmonoid * (M ^ Nat.zero).toAddSubmonoid = M.toAddSubmonoid * M.toAddSubmonoid ^ Nat.zero

tactic: rw [ih n.succ_ne_zero]
state_before: case succ.succ
ι : Sort uι
R : Type u
inst✝² : CommSemiring R
A : Type v
inst✝¹ : Semiring A
inst✝ : Algebra R A
S T : Set A
M N P Q : Submodule R A
m n✝¹ : A
n✝ : ℕ
h✝ : n✝ ≠ 0
n : ℕ
ih : Nat.succ n ≠ 0 → (M ^ Nat.succ n).toAddSubmonoid = M.toAddSubmonoid ^ Nat.succ n
h : Nat.succ (Nat.succ n) ≠ 0
⊢ M.toAddSubmonoid * (M ^ Nat.succ n).toAddSubmonoid = M.toAddSubmonoid * M.toAddSubmonoid ^ Nat.succ n
Theorem: ZFSet.toSet_subset_iff
File: Mathlib/SetTheory/ZFC/Basic.lean

tactic: simp [subset_def, Set.subset_def]
state_before: x y : ZFSet
⊢ toSet x ⊆ toSet y ↔ x ⊆ y
Theorem: Hindman.FP.singleton
File: Mathlib/Combinatorics/Hindman.lean

tactic: induction' i with i ih generalizing a
state_before: M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i : ℕ
⊢ Stream'.nth a i ∈ FP a

tactic: apply FP.head
state_before: case zero
M : Type u_1
inst✝ : Semigroup M
a✝ a : Stream' M
⊢ Stream'.nth a Nat.zero ∈ FP a

tactic: apply FP.tail
state_before: case succ
M : Type u_1
inst✝ : Semigroup M
a✝ : Stream' M
i : ℕ
ih : ∀ (a : Stream' M), Stream'.nth a i ∈ FP a
a : Stream' M
⊢ Stream'.nth a (Nat.succ i) ∈ FP a

tactic: apply ih
state_before: case succ.h
M : Type u_1
inst✝ : Semigroup M
a✝ : Stream' M
i : ℕ
ih : ∀ (a : Stream' M), Stream'.nth a i ∈ FP a
a : Stream' M
⊢ FP (Stream'.tail a) (Stream'.nth a (Nat.succ i))
Theorem: CategoryTheory.rightAdjointMate_comp_evaluation
File: Mathlib/CategoryTheory/Monoidal/Rigid/Basic.lean

tactic: apply_fun tensorRightHomEquiv _ X (Xᘁ) _
state_before: C : Type u₁
inst✝³ : Category C
inst✝² : MonoidalCategory C
X Y : C
inst✝¹ : HasRightDual X
inst✝ : HasRightDual Y
f : X ⟶ Y
⊢ (fᘁ ⊗ 𝟙 X) ≫ ε_ X Xᘁ = (𝟙 Yᘁ ⊗ f) ≫ ε_ Y Yᘁ

tactic: simp
state_before: C : Type u₁
inst✝³ : Category C
inst✝² : MonoidalCategory C
X Y : C
inst✝¹ : HasRightDual X
inst✝ : HasRightDual Y
f : X ⟶ Y
⊢ ↑(tensorRightHomEquiv Yᘁ X Xᘁ (𝟙_ C)) ((fᘁ ⊗ 𝟙 X) ≫ ε_ X Xᘁ) =
    ↑(tensorRightHomEquiv Yᘁ X Xᘁ (𝟙_ C)) ((𝟙 Yᘁ ⊗ f) ≫ ε_ Y Yᘁ)
Theorem: range_pow_padicValNat_subset_divisors
File: Mathlib/NumberTheory/Padics/PadicVal.lean

tactic: intro t ht
state_before: p n : ℕ
hn : n ≠ 0
⊢ Finset.image (fun x => p ^ x) (Finset.range (padicValNat p n + 1)) ⊆ divisors n

tactic: simp only [exists_prop, Finset.mem_image, Finset.mem_range] at ht
state_before: p n : ℕ
hn : n ≠ 0
t : ℕ
ht : t ∈ Finset.image (fun x => p ^ x) (Finset.range (padicValNat p n + 1))
⊢ t ∈ divisors n

tactic: obtain ⟨k, hk, rfl⟩ := ht
state_before: p n : ℕ
hn : n ≠ 0
t : ℕ
ht : ∃ a, a < padicValNat p n + 1 ∧ p ^ a = t
⊢ t ∈ divisors n

tactic: rw [Nat.mem_divisors]
state_before: case intro.intro
p n : ℕ
hn : n ≠ 0
k : ℕ
hk : k < padicValNat p n + 1
⊢ p ^ k ∈ divisors n

tactic: exact ⟨(pow_dvd_pow p <| by linarith).trans pow_padicValNat_dvd, hn⟩
state_before: case intro.intro
p n : ℕ
hn : n ≠ 0
k : ℕ
hk : k < padicValNat p n + 1
⊢ p ^ k ∣ n ∧ n ≠ 0

tactic: linarith
state_before: p n : ℕ
hn : n ≠ 0
k : ℕ
hk : k < padicValNat p n + 1
⊢ k ≤ padicValNat p n
Theorem: Polynomial.natDegree_C
File: Mathlib/Data/Polynomial/Degree/Definitions.lean

tactic: by_cases ha : a = 0
state_before: R : Type u
S : Type v
a✝ b c d : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
a : R
⊢ natDegree (↑C a) = 0

tactic: have : C a = 0 := by rw [ha, C_0]
state_before: case pos
R : Type u
S : Type v
a✝ b c d : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
a : R
ha : a = 0
⊢ natDegree (↑C a) = 0

tactic: rw [natDegree, degree_eq_bot.2 this]
state_before: case pos
R : Type u
S : Type v
a✝ b c d : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
a : R
ha : a = 0
this : ↑C a = 0
⊢ natDegree (↑C a) = 0

tactic: rfl
state_before: case pos
R : Type u
S : Type v
a✝ b c d : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
a : R
ha : a = 0
this : ↑C a = 0
⊢ WithBot.unbot' 0 ⊥ = 0

tactic: rw [ha, C_0]
state_before: R : Type u
S : Type v
a✝ b c d : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
a : R
ha : a = 0
⊢ ↑C a = 0

tactic: rw [natDegree, degree_C ha]
state_before: case neg
R : Type u
S : Type v
a✝ b c d : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
a : R
ha : ¬a = 0
⊢ natDegree (↑C a) = 0

tactic: rfl
state_before: case neg
R : Type u
S : Type v
a✝ b c d : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
a : R
ha : ¬a = 0
⊢ WithBot.unbot' 0 0 = 0
Theorem: Multiset.sup_le
File: Mathlib/Data/Multiset/Lattice.lean

tactic: simp
state_before: α : Type u_1
inst✝¹ : SemilatticeSup α
inst✝ : OrderBot α
s : Multiset α
a : α
⊢ sup 0 ≤ a ↔ ∀ (b : α), b ∈ 0 → b ≤ a

tactic: simp (config := { contextual := true }) [or_imp, forall_and]
state_before: α : Type u_1
inst✝¹ : SemilatticeSup α
inst✝ : OrderBot α
s : Multiset α
a : α
⊢ ∀ ⦃a_1 : α⦄ {s : Multiset α},
    (sup s ≤ a ↔ ∀ (b : α), b ∈ s → b ≤ a) → (sup (a_1 ::ₘ s) ≤ a ↔ ∀ (b : α), b ∈ a_1 ::ₘ s → b ≤ a)
Theorem: Nat.lt_base_pow_length_digits
File: Mathlib/Data/Nat/Digits.lean

tactic: rcases b with (_ | _ | b) <;> try simp_all
state_before: n b m : ℕ
hb : 1 < b
⊢ m < b ^ List.length (digits b m)

tactic: exact lt_base_pow_length_digits'
state_before: case succ.succ
n m b : ℕ
⊢ m < succ (succ b) ^ List.length (digits (succ (succ b)) m)

tactic: simp_all
state_before: case succ.succ
n m b : ℕ
hb : 1 < succ (succ b)
⊢ m < succ (succ b) ^ List.length (digits (succ (succ b)) m)
Theorem: Polynomial.degree_C_mul_X_pow_le
File: Mathlib/Data/Polynomial/Degree/Definitions.lean

tactic: rw [C_mul_X_pow_eq_monomial]
state_before: R : Type u
S : Type v
a✝ b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
n : ℕ
a : R
⊢ degree (↑C a * X ^ n) ≤ ↑n

tactic: apply degree_monomial_le
state_before: R : Type u
S : Type v
a✝ b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
n : ℕ
a : R
⊢ degree (↑(monomial n) a) ≤ ↑n
Theorem: Char.isValidUInt32
File: src/lean/Init/Data/Char/Basic.lean

tactic: match h with
| Or.inl h        =>
  apply Nat.lt_trans h
  decide
| Or.inr ⟨_,  h₂⟩ =>
  apply Nat.lt_trans h₂
  decide
state_before: n : Nat
h : isValidCharNat n
⊢ n < UInt32.size

tactic: apply Nat.lt_trans h
state_before: n : Nat
h✝ : isValidCharNat n
h : n < 55296
⊢ n < UInt32.size

tactic: decide
state_before: n : Nat
h✝ : isValidCharNat n
h : n < 55296
⊢ 55296 < UInt32.size

tactic: apply Nat.lt_trans h₂
state_before: n : Nat
h : isValidCharNat n
left✝ : 57343 < n
h₂ : n < 1114112
⊢ n < UInt32.size

tactic: decide
state_before: n : Nat
h : isValidCharNat n
left✝ : 57343 < n
h₂ : n < 1114112
⊢ 1114112 < UInt32.size
Theorem: LinearMap.concaveOn
File: Mathlib/Analysis/Convex/Function.lean

tactic: rw [f.map_add, f.map_smul, f.map_smul]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.183332
α : Type ?u.183335
β : Type u_3
ι : Type ?u.183341
inst✝⁶ : OrderedSemiring 𝕜
inst✝⁵ : AddCommMonoid E
inst✝⁴ : AddCommMonoid F
inst✝³ : OrderedAddCommMonoid α
inst✝² : OrderedAddCommMonoid β
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 β
f : E →ₗ[𝕜] β
s : Set E
hs : Convex 𝕜 s
x✝⁸ : E
x✝⁷ : x✝⁸ ∈ s
x✝⁶ : E
x✝⁵ : x✝⁶ ∈ s
x✝⁴ x✝³ : 𝕜
x✝² : 0 ≤ x✝⁴
x✝¹ : 0 ≤ x✝³
x✝ : x✝⁴ + x✝³ = 1
⊢ x✝⁴ • ↑f x✝⁸ + x✝³ • ↑f x✝⁶ ≤ ↑f (x✝⁴ • x✝⁸ + x✝³ • x✝⁶)
Theorem: frontier_closedBall
File: Mathlib/Analysis/NormedSpace/Basic.lean

tactic: rw [frontier, closure_closedBall, interior_closedBall x hr, closedBall_diff_ball]
state_before: α : Type ?u.89099
β : Type ?u.89102
γ : Type ?u.89105
ι : Type ?u.89108
inst✝⁶ : NormedField α
inst✝⁵ : SeminormedAddCommGroup β
E : Type u_1
inst✝⁴ : SeminormedAddCommGroup E
inst✝³ : NormedSpace α E
F : Type ?u.89139
inst✝² : SeminormedAddCommGroup F
inst✝¹ : NormedSpace α F
inst✝ : NormedSpace ℝ E
x : E
r : ℝ
hr : r ≠ 0
⊢ frontier (closedBall x r) = sphere x r
Theorem: UniqueFactorizationMonoid.dvd_iff_normalizedFactors_le_normalizedFactors
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: constructor
state_before: α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : DecidableEq α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
x y : α
hx : x ≠ 0
hy : y ≠ 0
⊢ x ∣ y ↔ normalizedFactors x ≤ normalizedFactors y

tactic: rintro ⟨c, rfl⟩
state_before: case mp
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : DecidableEq α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
x y : α
hx : x ≠ 0
hy : y ≠ 0
⊢ x ∣ y → normalizedFactors x ≤ normalizedFactors y

tactic: simp [hx, right_ne_zero_of_mul hy]
state_before: case mp.intro
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : DecidableEq α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
x : α
hx : x ≠ 0
c : α
hy : x * c ≠ 0
⊢ normalizedFactors x ≤ normalizedFactors (x * c)

tactic: rw [← (normalizedFactors_prod hx).dvd_iff_dvd_left, ←
  (normalizedFactors_prod hy).dvd_iff_dvd_right]
state_before: case mpr
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : DecidableEq α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
x y : α
hx : x ≠ 0
hy : y ≠ 0
⊢ normalizedFactors x ≤ normalizedFactors y → x ∣ y

tactic: apply Multiset.prod_dvd_prod_of_le
state_before: case mpr
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : DecidableEq α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
x y : α
hx : x ≠ 0
hy : y ≠ 0
⊢ normalizedFactors x ≤ normalizedFactors y → Multiset.prod (normalizedFactors x) ∣ Multiset.prod (normalizedFactors y)
Theorem: bernsteinPolynomial.iterate_derivative_at_1
File: Mathlib/RingTheory/Polynomial/Bernstein.lean

tactic: rw [flip' _ _ _ h]
state_before: R : Type u_1
inst✝ : CommRing R
n ν : ℕ
h : ν ≤ n
⊢ eval 1 ((↑derivative^[n - ν]) (bernsteinPolynomial R n ν)) = (-1) ^ (n - ν) * eval (↑ν + 1) (pochhammer R (n - ν))

tactic: simp [Polynomial.eval_comp, h]
state_before: R : Type u_1
inst✝ : CommRing R
n ν : ℕ
h : ν ≤ n
⊢ eval 1 ((↑derivative^[n - ν]) (comp (bernsteinPolynomial R n (n - ν)) (1 - X))) =
    (-1) ^ (n - ν) * eval (↑ν + 1) (pochhammer R (n - ν))

tactic: obtain rfl | h' := h.eq_or_lt
state_before: R : Type u_1
inst✝ : CommRing R
n ν : ℕ
h : ν ≤ n
⊢ (-1) ^ (n - ν) * eval (↑(n - (n - ν - 1))) (pochhammer R (n - ν)) =
    (-1) ^ (n - ν) * eval (↑ν + 1) (pochhammer R (n - ν))

tactic: simp
state_before: case inl
R : Type u_1
inst✝ : CommRing R
ν : ℕ
h : ν ≤ ν
⊢ (-1) ^ (ν - ν) * eval (↑(ν - (ν - ν - 1))) (pochhammer R (ν - ν)) =
    (-1) ^ (ν - ν) * eval (↑ν + 1) (pochhammer R (ν - ν))

tactic: congr
state_before: case inr
R : Type u_1
inst✝ : CommRing R
n ν : ℕ
h : ν ≤ n
h' : ν < n
⊢ (-1) ^ (n - ν) * eval (↑(n - (n - ν - 1))) (pochhammer R (n - ν)) =
    (-1) ^ (n - ν) * eval (↑ν + 1) (pochhammer R (n - ν))

tactic: norm_cast
state_before: case inr.e_a.e_a
R : Type u_1
inst✝ : CommRing R
n ν : ℕ
h : ν ≤ n
h' : ν < n
⊢ ↑(n - (n - ν - 1)) = ↑ν + 1

tactic: rw [← tsub_add_eq_tsub_tsub, tsub_tsub_cancel_of_le (Nat.succ_le_iff.mpr h')]
state_before: case inr.e_a.e_a
R : Type u_1
inst✝ : CommRing R
n ν : ℕ
h : ν ≤ n
h' : ν < n
⊢ ↑(n - (n - ν - 1)) = ↑(ν + 1)
Theorem: PNat.mul_div_exact
File: Mathlib/Data/PNat/Basic.lean

tactic: apply PNat.eq
state_before: m k : ℕ+
h : k ∣ m
⊢ k * divExact m k = m

tactic: rw [mul_coe]
state_before: case a
m k : ℕ+
h : k ∣ m
⊢ ↑(k * divExact m k) = ↑m

tactic: change (k : ℕ) * (div m k).succ = m
state_before: case a
m k : ℕ+
h : k ∣ m
⊢ ↑k * ↑(divExact m k) = ↑m

tactic: rw [← div_add_mod m k, dvd_iff'.mp h, Nat.mul_succ]
state_before: case a
m k : ℕ+
h : k ∣ m
⊢ ↑k * succ (div m k) = ↑m
Theorem: exists_Ico_subset_of_mem_nhds'
File: Mathlib/Topology/Order/Basic.lean

tactic: simpa only [OrderDual.exists, exists_prop, dual_Ico, dual_Ioc] using
  exists_Ioc_subset_of_mem_nhds' (show ofDual ⁻¹' s ∈ 𝓝 (toDual a) from hs) hu.dual
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : TopologicalSpace α
inst✝¹ : LinearOrder α
inst✝ : OrderTopology α
a : α
s : Set α
hs : s ∈ 𝓝 a
u : α
hu : a < u
⊢ ∃ u', u' ∈ Ioc a u ∧ Ico a u' ⊆ s
Theorem: mem_nhdsWithin_subtype
File: Mathlib/Topology/ContinuousOn.lean

tactic: rw [nhdsWithin, nhds_subtype, principal_subtype, ← comap_inf, ← nhdsWithin]
state_before: α : Type u_1
β : Type ?u.302592
γ : Type ?u.302595
δ : Type ?u.302598
inst✝ : TopologicalSpace α
s : Set α
a : { x // x ∈ s }
t u : Set { x // x ∈ s }
⊢ t ∈ 𝓝[u] a ↔ t ∈ comap Subtype.val (𝓝[Subtype.val '' u] ↑a)
Theorem: List.argmax_concat
File: Mathlib/Data/List/MinMax.lean

tactic: rw [argmax, argmax]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Preorder β
inst✝ : DecidableRel fun x x_1 => x < x_1
f✝ : α → β
l✝ : List α
o : Option α
a✝ m : α
f : α → β
a : α
l : List α
⊢ argmax f (l ++ [a]) = Option.casesOn (argmax f l) (some a) fun c => if f c < f a then some a else some c

tactic: simp [argAux]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Preorder β
inst✝ : DecidableRel fun x x_1 => x < x_1
f✝ : α → β
l✝ : List α
o : Option α
a✝ m : α
f : α → β
a : α
l : List α
⊢ foldl (argAux fun b c => f c < f b) none (l ++ [a]) =
    Option.casesOn (foldl (argAux fun b c => f c < f b) none l) (some a) fun c => if f c < f a then some a else some c
Theorem: Polynomial.reflect_eq_zero_iff
File: Mathlib/Data/Polynomial/Reverse.lean

tactic: rw [ofFinsupp_eq_zero, reflect, embDomain_eq_zero, ofFinsupp_eq_zero]
state_before: R : Type u_1
inst✝ : Semiring R
f✝ : R[X]
N : ℕ
f : R[X]
⊢ reflect N f = 0 ↔ f = 0
Theorem: ENNReal.ofReal_mul'
File: Mathlib/Data/Real/ENNReal.lean

tactic: rw [mul_comm, ofReal_mul hq, mul_comm]
state_before: α : Type ?u.814833
β : Type ?u.814836
a b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
p q : ℝ
hq : 0 ≤ q
⊢ ENNReal.ofReal (p * q) = ENNReal.ofReal p * ENNReal.ofReal q
Theorem: irrational_int_mul_iff
File: Mathlib/Data/Real/Irrational.lean

tactic: rw [← cast_coe_int, irrational_rat_mul_iff, Int.cast_ne_zero]
state_before: q : ℚ
m : ℤ
n : ℕ
x : ℝ
⊢ Irrational (↑m * x) ↔ m ≠ 0 ∧ Irrational x
Theorem: Nat.digits_add_two_add_one
File: Mathlib/Data/Nat/Digits.lean

tactic: simp [digits, digitsAux_def]
state_before: n✝ b n : ℕ
⊢ digits (b + 2) (n + 1) = (n + 1) % (b + 2) :: digits (b + 2) ((n + 1) / (b + 2))
Theorem: List.Ico.filter_le_of_top_le
File: Mathlib/Data/List/Intervals.lean

tactic: rw [decide_eq_true_eq]
state_before: n m l : ℕ
hml : m ≤ l
k : ℕ
hk : k ∈ Ico n m
⊢ ¬decide (l ≤ k) = true

tactic: exact not_le_of_gt (lt_of_lt_of_le (mem.1 hk).2 hml)
state_before: n m l : ℕ
hml : m ≤ l
k : ℕ
hk : k ∈ Ico n m
⊢ ¬l ≤ k
Theorem: List.getLastI_eq_getLast?
File: Mathlib/Data/List/Basic.lean

tactic: simp [getLastI, Inhabited.default]
state_before: ι : Type ?u.38004
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
inst✝ : Inhabited α
⊢ getLastI [] = Option.iget (getLast? [])

tactic: simp [getLastI, getLastI_eq_getLast? (c :: l)]
state_before: ι : Type ?u.38004
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
inst✝ : Inhabited α
head✝¹ head✝ c : α
l : List α
⊢ getLastI (head✝¹ :: head✝ :: c :: l) = Option.iget (getLast? (head✝¹ :: head✝ :: c :: l))
Theorem: CategoryTheory.IsCofiltered.inf_objs_exists
File: Mathlib/CategoryTheory/Filtered.lean

tactic: induction' O using Finset.induction with X O' nm h
state_before: C : Type u
inst✝¹ : Category C
inst✝ : IsCofiltered C
O : Finset C
⊢ ∃ S, ∀ {X : C}, X ∈ O → _root_.Nonempty (S ⟶ X)

tactic: . exact ⟨Classical.choice IsCofiltered.Nonempty, by intro; simp⟩
state_before: case empty
C : Type u
inst✝¹ : Category C
inst✝ : IsCofiltered C
⊢ ∃ S, ∀ {X : C}, X ∈ ∅ → _root_.Nonempty (S ⟶ X)

case insert
C : Type u
inst✝¹ : Category C
inst✝ : IsCofiltered C
X : C
O' : Finset C
nm : ¬X ∈ O'
h : ∃ S, ∀ {X : C}, X ∈ O' → _root_.Nonempty (S ⟶ X)
⊢ ∃ S, ∀ {X_1 : C}, X_1 ∈ insert X O' → _root_.Nonempty (S ⟶ X_1)

tactic: exact ⟨Classical.choice IsCofiltered.Nonempty, by intro; simp⟩
state_before: case empty
C : Type u
inst✝¹ : Category C
inst✝ : IsCofiltered C
⊢ ∃ S, ∀ {X : C}, X ∈ ∅ → _root_.Nonempty (S ⟶ X)

tactic: intro
state_before: C : Type u
inst✝¹ : Category C
inst✝ : IsCofiltered C
⊢ ∀ {X : C}, X ∈ ∅ → _root_.Nonempty (Classical.choice (_ : _root_.Nonempty C) ⟶ X)

tactic: simp
state_before: C : Type u
inst✝¹ : Category C
inst✝ : IsCofiltered C
X✝ : C
⊢ X✝ ∈ ∅ → _root_.Nonempty (Classical.choice (_ : _root_.Nonempty C) ⟶ X✝)

tactic: obtain ⟨S', w'⟩ := h
state_before: case insert
C : Type u
inst✝¹ : Category C
inst✝ : IsCofiltered C
X : C
O' : Finset C
nm : ¬X ∈ O'
h : ∃ S, ∀ {X : C}, X ∈ O' → _root_.Nonempty (S ⟶ X)
⊢ ∃ S, ∀ {X_1 : C}, X_1 ∈ insert X O' → _root_.Nonempty (S ⟶ X_1)

tactic: use min X S'
state_before: case insert.intro
C : Type u
inst✝¹ : Category C
inst✝ : IsCofiltered C
X : C
O' : Finset C
nm : ¬X ∈ O'
S' : C
w' : ∀ {X : C}, X ∈ O' → _root_.Nonempty (S' ⟶ X)
⊢ ∃ S, ∀ {X_1 : C}, X_1 ∈ insert X O' → _root_.Nonempty (S ⟶ X_1)

tactic: rintro Y mY
state_before: case insert.intro
C : Type u
inst✝¹ : Category C
inst✝ : IsCofiltered C
X : C
O' : Finset C
nm : ¬X ∈ O'
S' : C
w' : ∀ {X : C}, X ∈ O' → _root_.Nonempty (S' ⟶ X)
⊢ ∀ {X_1 : C}, X_1 ∈ insert X O' → _root_.Nonempty (min X S' ⟶ X_1)

tactic: obtain rfl | h := eq_or_ne Y X
state_before: case insert.intro
C : Type u
inst✝¹ : Category C
inst✝ : IsCofiltered C
X : C
O' : Finset C
nm : ¬X ∈ O'
S' : C
w' : ∀ {X : C}, X ∈ O' → _root_.Nonempty (S' ⟶ X)
Y : C
mY : Y ∈ insert X O'
⊢ _root_.Nonempty (min X S' ⟶ Y)

tactic: exact ⟨minToLeft _ _⟩
state_before: case insert.intro.inl
C : Type u
inst✝¹ : Category C
inst✝ : IsCofiltered C
O' : Finset C
S' : C
w' : ∀ {X : C}, X ∈ O' → _root_.Nonempty (S' ⟶ X)
Y : C
nm : ¬Y ∈ O'
mY : Y ∈ insert Y O'
⊢ _root_.Nonempty (min Y S' ⟶ Y)

tactic: exact ⟨minToRight _ _ ≫ (w' (Finset.mem_of_mem_insert_of_ne mY h)).some⟩
state_before: case insert.intro.inr
C : Type u
inst✝¹ : Category C
inst✝ : IsCofiltered C
X : C
O' : Finset C
nm : ¬X ∈ O'
S' : C
w' : ∀ {X : C}, X ∈ O' → _root_.Nonempty (S' ⟶ X)
Y : C
mY : Y ∈ insert X O'
h : Y ≠ X
⊢ _root_.Nonempty (min X S' ⟶ Y)
Theorem: List.length_tail
File: Std/Data/List/Lemmas.lean

tactic: cases l <;> rfl
state_before: α : Type u_1
l : List α
⊢ length (tail l) = length l - 1
Theorem: Filter.set_eventuallyLE_iff_inf_principal_le
File: Mathlib/Order/Filter/Basic.lean

tactic: simp only [le_inf_iff, inf_le_left, true_and_iff, le_principal_iff]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.209114
ι : Sort x
s t : Set α
l : Filter α
⊢ t ∈ l ⊓ 𝓟 s ↔ l ⊓ 𝓟 s ≤ l ⊓ 𝓟 t
Theorem: MvPolynomial.degreeOf_def
File: Mathlib/Data/MvPolynomial/Variables.lean

tactic: rw [degreeOf]
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.278467
r : R
e : ℕ
n✝ m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
p✝ q : MvPolynomial σ R
inst✝ : DecidableEq σ
n : σ
p : MvPolynomial σ R
⊢ degreeOf n p = Multiset.count n (degrees p)

tactic: convert rfl
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.278467
r : R
e : ℕ
n✝ m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
p✝ q : MvPolynomial σ R
inst✝ : DecidableEq σ
n : σ
p : MvPolynomial σ R
⊢ Multiset.count n (degrees p) = Multiset.count n (degrees p)
Theorem: Fin.last_sub
File: Mathlib/Data/Fin/Basic.lean

tactic: rw [coe_sub_iff_le.2 i.le_last, val_last, val_rev, Nat.succ_sub_succ_eq_sub]
state_before: n m : ℕ
i : Fin (n + 1)
⊢ ↑(last n - i) = ↑(↑rev i)
Theorem: add_lt_ack
File: Mathlib/Computability/Ackermann.lean

tactic: simp
state_before: n : ℕ
⊢ 0 + n < ack 0 n

tactic: simpa using add_lt_ack m 1
state_before: m : ℕ
⊢ m + 1 + 0 < ack (m + 1) 0

tactic: linarith
state_before: m n : ℕ
⊢ m + 1 + n + 1 ≤ m + (m + n + 2)

tactic: rw [succ_eq_add_one]
state_before: m n : ℕ
⊢ m + n + 2 = succ (m + 1 + n)

tactic: ring_nf
state_before: m n : ℕ
⊢ m + n + 2 = m + 1 + n + 1
Theorem: Subgroup.card_eq_card_quotient_mul_card_subgroup
File: Mathlib/GroupTheory/Coset.lean

tactic: rw [← Fintype.card_prod]
state_before: α : Type u_1
inst✝³ : Group α
s✝ t : Subgroup α
inst✝² : Fintype α
s : Subgroup α
inst✝¹ : Fintype { x // x ∈ s }
inst✝ : DecidablePred fun a => a ∈ s
⊢ Fintype.card α = Fintype.card (α ⧸ s) * Fintype.card { x // x ∈ s }

tactic: exact Fintype.card_congr Subgroup.groupEquivQuotientProdSubgroup
state_before: α : Type u_1
inst✝³ : Group α
s✝ t : Subgroup α
inst✝² : Fintype α
s : Subgroup α
inst✝¹ : Fintype { x // x ∈ s }
inst✝ : DecidablePred fun a => a ∈ s
⊢ Fintype.card α = Fintype.card ((α ⧸ s) × { x // x ∈ s })
Theorem: Finset.biUnion_subset_biUnion_of_subset_left
File: Mathlib/Data/Finset/Basic.lean

tactic: intro x
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.518185
inst✝ : DecidableEq β
s s₁ s₂ : Finset α
t✝ t₁ t₂ t : α → Finset β
h : s₁ ⊆ s₂
⊢ Finset.biUnion s₁ t ⊆ Finset.biUnion s₂ t

tactic: simp only [and_imp, mem_biUnion, exists_prop]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.518185
inst✝ : DecidableEq β
s s₁ s₂ : Finset α
t✝ t₁ t₂ t : α → Finset β
h : s₁ ⊆ s₂
x : β
⊢ x ∈ Finset.biUnion s₁ t → x ∈ Finset.biUnion s₂ t

tactic: exact Exists.imp fun a ha => ⟨h ha.1, ha.2⟩
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.518185
inst✝ : DecidableEq β
s s₁ s₂ : Finset α
t✝ t₁ t₂ t : α → Finset β
h : s₁ ⊆ s₂
x : β
⊢ (∃ a, a ∈ s₁ ∧ x ∈ t a) → ∃ a, a ∈ s₂ ∧ x ∈ t a
Theorem: PolishSpace.IsClopenable.compl
File: Mathlib/Topology/MetricSpace/Polish.lean

tactic: rcases hs with ⟨t, t_le, t_polish, h, h'⟩
state_before: α : Type u_1
β : Type ?u.67736
inst✝ : TopologicalSpace α
s : Set α
hs : IsClopenable s
⊢ IsClopenable (sᶜ)

tactic: exact ⟨t, t_le, t_polish, @IsOpen.isClosed_compl α t s h', @IsClosed.isOpen_compl α t s h⟩
state_before: case intro.intro.intro.intro
α : Type u_1
β : Type ?u.67736
inst✝ : TopologicalSpace α
s : Set α
t : TopologicalSpace α
t_le : t ≤ inst✝
t_polish : PolishSpace α
h : IsClosed s
h' : IsOpen s
⊢ IsClopenable (sᶜ)