tasksource/leandojo huggingface dataset:
Theorem: Cardinal.isStrongLimit_aleph0
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

tactic: rcases lt_aleph0.1 hx with ⟨n, rfl⟩
state_before: α : Type ?u.113582
r : α → α → Prop
x : Cardinal
hx : x < ℵ₀
⊢ 2 ^ x < ℵ₀

tactic: exact_mod_cast nat_lt_aleph0 (2 ^ n)
state_before: case intro
α : Type ?u.113582
r : α → α → Prop
n : ℕ
hx : ↑n < ℵ₀
⊢ 2 ^ ↑n < ℵ₀
Theorem: Polynomial.erase_monomial
File: Mathlib/Data/Polynomial/Basic.lean

tactic: simp
state_before: R : Type u
a✝ b : R
m n✝ : ℕ
inst✝ : Semiring R
p q : R[X]
n : ℕ
a : R
⊢ (erase n (↑(monomial n) a)).toFinsupp = 0.toFinsupp
Theorem: Set.prod_self_eq_iUnion_perm
File: Mathlib/GroupTheory/Perm/Cycle/Basic.lean

tactic: ext ⟨a, b⟩
state_before: ι : Type ?u.3084179
α : Type u_1
β : Type ?u.3084185
inst✝ : DecidableEq α
f : Perm α
s : Set α
hf : IsCycleOn f s
⊢ s ×ˢ s = ⋃ (n : ℤ), (fun a => (a, ↑(f ^ n) a)) '' s

tactic: simp only [Set.mem_prod, Set.mem_iUnion, Set.mem_image]
state_before: case h.mk
ι : Type ?u.3084179
α : Type u_1
β : Type ?u.3084185
inst✝ : DecidableEq α
f : Perm α
s : Set α
hf : IsCycleOn f s
a b : α
⊢ (a, b) ∈ s ×ˢ s ↔ (a, b) ∈ ⋃ (n : ℤ), (fun a => (a, ↑(f ^ n) a)) '' s

tactic: refine' ⟨fun hx => _, _⟩
state_before: case h.mk
ι : Type ?u.3084179
α : Type u_1
β : Type ?u.3084185
inst✝ : DecidableEq α
f : Perm α
s : Set α
hf : IsCycleOn f s
a b : α
⊢ a ∈ s ∧ b ∈ s ↔ ∃ i x, x ∈ s ∧ (x, ↑(f ^ i) x) = (a, b)

tactic: obtain ⟨n, rfl⟩ := hf.2 hx.1 hx.2
state_before: case h.mk.refine'_1
ι : Type ?u.3084179
α : Type u_1
β : Type ?u.3084185
inst✝ : DecidableEq α
f : Perm α
s : Set α
hf : IsCycleOn f s
a b : α
hx : a ∈ s ∧ b ∈ s
⊢ ∃ i x, x ∈ s ∧ (x, ↑(f ^ i) x) = (a, b)

tactic: exact ⟨_, _, hx.1, rfl⟩
state_before: case h.mk.refine'_1.intro
ι : Type ?u.3084179
α : Type u_1
β : Type ?u.3084185
inst✝ : DecidableEq α
f : Perm α
s : Set α
hf : IsCycleOn f s
a : α
n : ℤ
hx : a ∈ s ∧ ↑(f ^ n) a ∈ s
⊢ ∃ i x, x ∈ s ∧ (x, ↑(f ^ i) x) = (a, ↑(f ^ n) a)

tactic: rintro ⟨n, a, ha, ⟨⟩⟩
state_before: case h.mk.refine'_2
ι : Type ?u.3084179
α : Type u_1
β : Type ?u.3084185
inst✝ : DecidableEq α
f : Perm α
s : Set α
hf : IsCycleOn f s
a b : α
⊢ (∃ i x, x ∈ s ∧ (x, ↑(f ^ i) x) = (a, b)) → a ∈ s ∧ b ∈ s

tactic: exact ⟨ha, (hf.1.perm_zpow _).mapsTo ha⟩
state_before: case h.mk.refine'_2.intro.intro.intro.refl
ι : Type ?u.3084179
α : Type u_1
β : Type ?u.3084185
inst✝ : DecidableEq α
f : Perm α
s : Set α
hf : IsCycleOn f s
a : α
n : ℤ
ha : a ∈ s
⊢ a ∈ s ∧ ↑(f ^ n) a ∈ s
Theorem: Dfinsupp.update_eq_erase_add_single
File: Mathlib/Data/Dfinsupp/Basic.lean

tactic: ext j
state_before: ι : Type u
γ : Type w
β✝ : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β✝ i)
s : Finset ι
x : (i : ↑↑s) → β✝ ↑i
i✝ : ι
f✝ : Π₀ (i : ι), β✝ i
b✝ : β✝ i✝
j : ι
β : ι → Type u_1
inst✝ : (i : ι) → AddZeroClass (β i)
f : Π₀ (i : ι), β i
i : ι
b : β i
⊢ update i f b = erase i f + single i b

tactic: rcases eq_or_ne i j with (rfl | h)
state_before: case h
ι : Type u
γ : Type w
β✝ : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β✝ i)
s : Finset ι
x : (i : ↑↑s) → β✝ ↑i
i✝ : ι
f✝ : Π₀ (i : ι), β✝ i
b✝ : β✝ i✝
j✝ : ι
β : ι → Type u_1
inst✝ : (i : ι) → AddZeroClass (β i)
f : Π₀ (i : ι), β i
i : ι
b : β i
j : ι
⊢ ↑(update i f b) j = ↑(erase i f + single i b) j

tactic: simp
state_before: case h.inl
ι : Type u
γ : Type w
β✝ : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β✝ i)
s : Finset ι
x : (i : ↑↑s) → β✝ ↑i
i✝ : ι
f✝ : Π₀ (i : ι), β✝ i
b✝ : β✝ i✝
j : ι
β : ι → Type u_1
inst✝ : (i : ι) → AddZeroClass (β i)
f : Π₀ (i : ι), β i
i : ι
b : β i
⊢ ↑(update i f b) i = ↑(erase i f + single i b) i

tactic: simp [Function.update_noteq h.symm, h, erase_ne, h.symm]
state_before: case h.inr
ι : Type u
γ : Type w
β✝ : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β✝ i)
s : Finset ι
x : (i : ↑↑s) → β✝ ↑i
i✝ : ι
f✝ : Π₀ (i : ι), β✝ i
b✝ : β✝ i✝
j✝ : ι
β : ι → Type u_1
inst✝ : (i : ι) → AddZeroClass (β i)
f : Π₀ (i : ι), β i
i : ι
b : β i
j : ι
h : i ≠ j
⊢ ↑(update i f b) j = ↑(erase i f + single i b) j
Theorem: strictMono_of_odd_strictMonoOn_nonneg
File: Mathlib/Order/Monotone/Odd.lean

tactic: refine' StrictMonoOn.Iic_union_Ici (fun x hx y hy hxy => neg_lt_neg_iff.1 _) h₂
state_before: G : Type u_2
H : Type u_1
inst✝¹ : LinearOrderedAddCommGroup G
inst✝ : OrderedAddCommGroup H
f : G → H
h₁ : ∀ (x : G), f (-x) = -f x
h₂ : StrictMonoOn f (Ici 0)
⊢ StrictMono f

tactic: rw [← h₁, ← h₁]
state_before: G : Type u_2
H : Type u_1
inst✝¹ : LinearOrderedAddCommGroup G
inst✝ : OrderedAddCommGroup H
f : G → H
h₁ : ∀ (x : G), f (-x) = -f x
h₂ : StrictMonoOn f (Ici 0)
x : G
hx : x ∈ Iic 0
y : G
hy : y ∈ Iic 0
hxy : x < y
⊢ -f y < -f x

tactic: exact h₂ (neg_nonneg.2 hy) (neg_nonneg.2 hx) (neg_lt_neg hxy)
state_before: G : Type u_2
H : Type u_1
inst✝¹ : LinearOrderedAddCommGroup G
inst✝ : OrderedAddCommGroup H
f : G → H
h₁ : ∀ (x : G), f (-x) = -f x
h₂ : StrictMonoOn f (Ici 0)
x : G
hx : x ∈ Iic 0
y : G
hy : y ∈ Iic 0
hxy : x < y
⊢ f (-y) < f (-x)
Theorem: Nat.Icc_pred_right
File: Mathlib/Data/Nat/Interval.lean

tactic: ext x
state_before: a b✝ c b : ℕ
h : 0 < b
⊢ Icc a (b - 1) = Ico a b

tactic: rw [mem_Icc, mem_Ico, lt_iff_le_pred h]
state_before: case a
a b✝ c b : ℕ
h : 0 < b
x : ℕ
⊢ x ∈ Icc a (b - 1) ↔ x ∈ Ico a b
Theorem: MvPolynomial.rank_mvPolynomial
File: Mathlib/FieldTheory/MvPolynomial.lean

tactic: rw [← Cardinal.lift_inj, ← (basisMonomials σ K).mk_eq_rank]
state_before: σ K : Type u
inst✝ : Field K
⊢ Module.rank K (MvPolynomial σ K) = Cardinal.mk (σ →₀ ℕ)
Theorem: ciSup_partialSups_eq
File: Mathlib/Order/PartialSups.lean

tactic: refine' (ciSup_le fun n => _).antisymm (ciSup_mono _ <| le_partialSups f)
state_before: α : Type u_1
inst✝ : ConditionallyCompleteLattice α
f : ℕ → α
h : BddAbove (Set.range f)
⊢ (⨆ (n : ℕ), ↑(partialSups f) n) = ⨆ (n : ℕ), f n

tactic: rw [partialSups_eq_ciSup_Iic]
state_before: case refine'_1
α : Type u_1
inst✝ : ConditionallyCompleteLattice α
f : ℕ → α
h : BddAbove (Set.range f)
n : ℕ
⊢ ↑(partialSups f) n ≤ ⨆ (n : ℕ), f n

tactic: exact ciSup_le fun i => le_ciSup h _
state_before: case refine'_1
α : Type u_1
inst✝ : ConditionallyCompleteLattice α
f : ℕ → α
h : BddAbove (Set.range f)
n : ℕ
⊢ (⨆ (i : ↑(Set.Iic n)), f ↑i) ≤ ⨆ (n : ℕ), f n

tactic: rwa [bddAbove_range_partialSups]
state_before: case refine'_2
α : Type u_1
inst✝ : ConditionallyCompleteLattice α
f : ℕ → α
h : BddAbove (Set.range f)
⊢ BddAbove (Set.range fun n => ↑(partialSups f) n)
Theorem: List.isRotated_prev_eq
File: Mathlib/Data/List/Cycle.lean

tactic: rw [← next_reverse_eq_prev _ hn, ← next_reverse_eq_prev _ (h.nodup_iff.mp hn)]
state_before: α : Type u_1
inst✝ : DecidableEq α
l✝ : List α
x✝ : α
l l' : List α
h : l ~r l'
hn : Nodup l
x : α
hx : x ∈ l
⊢ prev l x hx = prev l' x (_ : x ∈ l')

tactic: exact isRotated_next_eq h.reverse (nodup_reverse.mpr hn) _
state_before: α : Type u_1
inst✝ : DecidableEq α
l✝ : List α
x✝ : α
l l' : List α
h : l ~r l'
hn : Nodup l
x : α
hx : x ∈ l
⊢ next (reverse l) x (_ : x ∈ reverse l) = next (reverse l') x (_ : x ∈ reverse l')
Theorem: mul_dvd_mul_iff_right
File: Mathlib/Algebra/GroupWithZero/Divisibility.lean

tactic: rw [mul_right_comm, mul_left_inj' hc]
state_before: α : Type u_1
inst✝ : CancelCommMonoidWithZero α
a b c : α
hc : c ≠ 0
d : α
⊢ b * c = a * c * d ↔ b = a * d
Theorem: Rat.coe_nat_div
File: Mathlib/Data/Rat/Lemmas.lean

tactic: rcases h with ⟨c, rfl⟩
state_before: a b : ℕ
h : b ∣ a
⊢ ↑(a / b) = ↑a / ↑b

tactic: simp only [mul_comm b, Nat.mul_div_assoc c (dvd_refl b), Nat.cast_mul, mul_div_assoc,
  coe_nat_div_self]
state_before: case intro
b c : ℕ
⊢ ↑(b * c / b) = ↑(b * c) / ↑b
Theorem: Nat.even_pow
File: Mathlib/Data/Nat/Parity.lean

tactic: induction' n with n ih <;> simp (config := { contextual := true }) [*, pow_succ', even_mul]
state_before: m n : ℕ
⊢ Even (m ^ n) ↔ Even m ∧ n ≠ 0
Theorem: unitInterval.qRight_zero_left
File: Mathlib/Topology/Homotopy/HSpaces.lean

tactic: simp only [coe_zero, mul_zero, zero_div, le_refl]
state_before: θ : ↑I
⊢ 2 * ↑(0, θ).fst / (1 + ↑(0, θ).snd) ≤ 0
Theorem: factorization_one
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: simp [factorization]
state_before: α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : UniqueFactorizationMonoid α
inst✝¹ : NormalizationMonoid α
inst✝ : DecidableEq α
⊢ factorization 1 = 0
Theorem: Set.preimage_const_mul_Ioi_of_neg
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simpa only [mul_comm] using preimage_mul_const_Ioi_of_neg a h
state_before: α : Type u_1
inst✝ : LinearOrderedField α
a✝ a c : α
h : c < 0
⊢ (fun x x_1 => x * x_1) c ⁻¹' Ioi a = Iio (a / c)
Theorem: AlgebraicGeometry.StructureSheaf.isUnit_toStalk
File: Mathlib/AlgebraicGeometry/StructureSheaf.lean

tactic: erw [← germ_toOpen R (PrimeSpectrum.basicOpen (f : R)) ⟨x, f.2⟩ (f : R)]
state_before: R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
f : { x_1 // x_1 ∈ Ideal.primeCompl x.asIdeal }
⊢ IsUnit (↑(toStalk R x) ↑f)

tactic: exact RingHom.isUnit_map _ (isUnit_to_basicOpen_self R f)
state_before: R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
f : { x_1 // x_1 ∈ Ideal.primeCompl x.asIdeal }
⊢ IsUnit
    (↑(germ (Sheaf.presheaf (structureSheaf R)) { val := x, property := (_ : ↑f ∈ Ideal.primeCompl x.asIdeal) })
      (↑(toOpen R (PrimeSpectrum.basicOpen ↑f)) ↑f))
Theorem: CategoryTheory.MonoidalCategory.tensor_dite
File: Mathlib/CategoryTheory/Monoidal/Category.lean

tactic: split_ifs <;> rfl
state_before: C✝ : Type u
𝒞 : Category C✝
inst✝³ : MonoidalCategory C✝
C : Type u
inst✝² : Category C
inst✝¹ : MonoidalCategory C
U V W✝ X✝ Y✝ Z✝ : C
P : Prop
inst✝ : Decidable P
W X Y Z : C
f : W ⟶ X
g : P → (Y ⟶ Z)
g' : ¬P → (Y ⟶ Z)
⊢ (f ⊗ if h : P then g h else g' h) = if h : P then f ⊗ g h else f ⊗ g' h
Theorem: Set.forall_in_swap
File: Mathlib/Data/Set/Basic.lean

tactic: tauto
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
p : α → β → Prop
⊢ (∀ (a : α), a ∈ s → ∀ (b : β), p a b) ↔ ∀ (b : β) (a : α), a ∈ s → p a b
Theorem: ContinuousLinearMap.toLinear_compLeftContinuousCompact
File: Mathlib/Topology/ContinuousFunction/Compact.lean

tactic: ext f
state_before: X : Type u_4
𝕜 : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁶ : TopologicalSpace X
inst✝⁵ : CompactSpace X
inst✝⁴ : NontriviallyNormedField 𝕜
inst✝³ : NormedAddCommGroup β
inst✝² : NormedSpace 𝕜 β
inst✝¹ : NormedAddCommGroup γ
inst✝ : NormedSpace 𝕜 γ
g : β →L[𝕜] γ
⊢ ↑(ContinuousLinearMap.compLeftContinuousCompact X g) = ContinuousLinearMap.compLeftContinuous 𝕜 X g

tactic: rfl
state_before: case h.h
X : Type u_4
𝕜 : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁶ : TopologicalSpace X
inst✝⁵ : CompactSpace X
inst✝⁴ : NontriviallyNormedField 𝕜
inst✝³ : NormedAddCommGroup β
inst✝² : NormedSpace 𝕜 β
inst✝¹ : NormedAddCommGroup γ
inst✝ : NormedSpace 𝕜 γ
g : β →L[𝕜] γ
f : C(X, β)
a✝ : X
⊢ ↑(↑↑(ContinuousLinearMap.compLeftContinuousCompact X g) f) a✝ =
    ↑(↑(ContinuousLinearMap.compLeftContinuous 𝕜 X g) f) a✝
Theorem: CategoryTheory.Limits.IsZero.of_epi
File: Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean

tactic: have hf := i.eq_zero_of_src f
state_before: C : Type u
inst✝³ : Category C
D : Type u'
inst✝² : Category D
inst✝¹ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝ : Epi f
i : IsZero X
⊢ IsZero Y

tactic: subst hf
state_before: C : Type u
inst✝³ : Category C
D : Type u'
inst✝² : Category D
inst✝¹ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝ : Epi f
i : IsZero X
hf : f = 0
⊢ IsZero Y

tactic: exact IsZero.of_epi_zero X Y
state_before: C : Type u
inst✝³ : Category C
D : Type u'
inst✝² : Category D
inst✝¹ : HasZeroMorphisms C
X Y : C
i : IsZero X
inst✝ : Epi 0
⊢ IsZero Y
Theorem: Complex.abs_im_le_abs
File: Mathlib/Data/Complex/Basic.lean

tactic: rw [normSq_apply, ← sq, ← sq]
state_before: z : ℂ
⊢ z.im ^ 2 ≤ ↑normSq z

tactic: exact le_add_of_nonneg_left (sq_nonneg _)
state_before: z : ℂ
⊢ z.im ^ 2 ≤ z.re ^ 2 + z.im ^ 2
Theorem: IsPrimitiveRoot.card_rootsOfUnity
File: Mathlib/RingTheory/RootsOfUnity/Basic.lean

tactic: obtain ⟨ζ, hζ⟩ := h.isUnit n.pos
state_before: M : Type ?u.3545896
N : Type ?u.3545899
G : Type ?u.3545902
R : Type u_1
S : Type ?u.3545908
F : Type ?u.3545911
inst✝⁴ : CommMonoid M
inst✝³ : CommMonoid N
inst✝² : DivisionCommMonoid G
k l : ℕ
inst✝¹ : CommRing R
ζ✝ : Rˣ
h✝ : IsPrimitiveRoot ζ✝ k
inst✝ : IsDomain R
ζ : R
n : ℕ+
h : IsPrimitiveRoot ζ ↑n
⊢ Fintype.card { x // x ∈ rootsOfUnity n R } = ↑n

tactic: rw [← hζ, IsPrimitiveRoot.coe_units_iff] at h
state_before: case intro
M : Type ?u.3545896
N : Type ?u.3545899
G : Type ?u.3545902
R : Type u_1
S : Type ?u.3545908
F : Type ?u.3545911
inst✝⁴ : CommMonoid M
inst✝³ : CommMonoid N
inst✝² : DivisionCommMonoid G
k l : ℕ
inst✝¹ : CommRing R
ζ✝¹ : Rˣ
h✝ : IsPrimitiveRoot ζ✝¹ k
inst✝ : IsDomain R
ζ✝ : R
n : ℕ+
h : IsPrimitiveRoot ζ✝ ↑n
ζ : Rˣ
hζ : ↑ζ = ζ✝
⊢ Fintype.card { x // x ∈ rootsOfUnity n R } = ↑n

tactic: exact h.card_rootsOfUnity'
state_before: case intro
M : Type ?u.3545896
N : Type ?u.3545899
G : Type ?u.3545902
R : Type u_1
S : Type ?u.3545908
F : Type ?u.3545911
inst✝⁴ : CommMonoid M
inst✝³ : CommMonoid N
inst✝² : DivisionCommMonoid G
k l : ℕ
inst✝¹ : CommRing R
ζ✝¹ : Rˣ
h✝ : IsPrimitiveRoot ζ✝¹ k
inst✝ : IsDomain R
ζ✝ : R
n : ℕ+
ζ : Rˣ
h : IsPrimitiveRoot ζ ↑n
hζ : ↑ζ = ζ✝
⊢ Fintype.card { x // x ∈ rootsOfUnity n R } = ↑n
Theorem: ENNReal.sSup_add
File: Mathlib/Topology/Instances/ENNReal.lean

tactic: rw [sSup_eq_iSup, biSup_add hs]
state_before: α : Type ?u.135069
β : Type ?u.135072
γ : Type ?u.135075
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s✝ s : Set ℝ≥0∞
hs : Set.Nonempty s
⊢ sSup s + a = ⨆ (b : ℝ≥0∞) (_ : b ∈ s), b + a
Theorem: LocalizedModule.add_zero'
File: Mathlib/Algebra/Module/LocalizedModule.lean

tactic: rw [← zero_mk s, mk_add_mk, smul_zero, add_zero, mk_eq]
state_before: R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
x : LocalizedModule S M
m : M
s : { x // x ∈ S }
⊢ mk m s + 0 = mk m s

tactic: exact ⟨1, by rw [one_smul, mul_smul, one_smul]⟩
state_before: R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
x : LocalizedModule S M
m : M
s : { x // x ∈ S }
⊢ ∃ u, u • s • s • m = u • (s * s) • m

tactic: rw [one_smul, mul_smul, one_smul]
state_before: R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
x : LocalizedModule S M
m : M
s : { x // x ∈ S }
⊢ 1 • s • s • m = 1 • (s * s) • m
Theorem: Finset.powersetLen_nonempty
File: Mathlib/Data/Finset/Powerset.lean

tactic: induction' s using Finset.induction_on with x s hx IH generalizing n
state_before: α : Type u_1
s✝ t : Finset α
n : ℕ
s : Finset α
h : n ≤ card s
⊢ Finset.Nonempty (powersetLen n s)

tactic: rw [card_empty, le_zero_iff] at h
state_before: case empty
α : Type u_1
s✝ t : Finset α
n✝ : ℕ
s : Finset α
h✝ : n✝ ≤ card s
n : ℕ
h : n ≤ card ∅
⊢ Finset.Nonempty (powersetLen n ∅)

tactic: rw [h, powersetLen_zero]
state_before: case empty
α : Type u_1
s✝ t : Finset α
n✝ : ℕ
s : Finset α
h✝ : n✝ ≤ card s
n : ℕ
h : n = 0
⊢ Finset.Nonempty (powersetLen n ∅)

tactic: exact Finset.singleton_nonempty _
state_before: case empty
α : Type u_1
s✝ t : Finset α
n✝ : ℕ
s : Finset α
h✝ : n✝ ≤ card s
n : ℕ
h : n = 0
⊢ Finset.Nonempty {∅}

tactic: cases n
state_before: case insert
α : Type u_1
s✝¹ t : Finset α
n✝ : ℕ
s✝ : Finset α
h✝ : n✝ ≤ card s✝
x : α
s : Finset α
hx : ¬x ∈ s
IH : ∀ {n : ℕ}, n ≤ card s → Finset.Nonempty (powersetLen n s)
n : ℕ
h : n ≤ card (insert x s)
⊢ Finset.Nonempty (powersetLen n (insert x s))

tactic: simp
state_before: case insert.zero
α : Type u_1
s✝¹ t : Finset α
n : ℕ
s✝ : Finset α
h✝ : n ≤ card s✝
x : α
s : Finset α
hx : ¬x ∈ s
IH : ∀ {n : ℕ}, n ≤ card s → Finset.Nonempty (powersetLen n s)
h : Nat.zero ≤ card (insert x s)
⊢ Finset.Nonempty (powersetLen Nat.zero (insert x s))

tactic: rw [card_insert_of_not_mem hx, Nat.succ_le_succ_iff] at h
state_before: case insert.succ
α : Type u_1
s✝¹ t : Finset α
n : ℕ
s✝ : Finset α
h✝ : n ≤ card s✝
x : α
s : Finset α
hx : ¬x ∈ s
IH : ∀ {n : ℕ}, n ≤ card s → Finset.Nonempty (powersetLen n s)
n✝ : ℕ
h : Nat.succ n✝ ≤ card (insert x s)
⊢ Finset.Nonempty (powersetLen (Nat.succ n✝) (insert x s))

tactic: rw [powersetLen_succ_insert hx]
state_before: case insert.succ
α : Type u_1
s✝¹ t : Finset α
n : ℕ
s✝ : Finset α
h✝ : n ≤ card s✝
x : α
s : Finset α
hx : ¬x ∈ s
IH : ∀ {n : ℕ}, n ≤ card s → Finset.Nonempty (powersetLen n s)
n✝ : ℕ
h : n✝ ≤ card s
⊢ Finset.Nonempty (powersetLen (Nat.succ n✝) (insert x s))

tactic: refine' Nonempty.mono _ ((IH h).image (insert x))
state_before: case insert.succ
α : Type u_1
s✝¹ t : Finset α
n : ℕ
s✝ : Finset α
h✝ : n ≤ card s✝
x : α
s : Finset α
hx : ¬x ∈ s
IH : ∀ {n : ℕ}, n ≤ card s → Finset.Nonempty (powersetLen n s)
n✝ : ℕ
h : n✝ ≤ card s
⊢ Finset.Nonempty (powersetLen (Nat.succ n✝) s ∪ image (insert x) (powersetLen n✝ s))

tactic: exact subset_union_right _ _
state_before: case insert.succ
α : Type u_1
s✝¹ t : Finset α
n : ℕ
s✝ : Finset α
h✝ : n ≤ card s✝
x : α
s : Finset α
hx : ¬x ∈ s
IH : ∀ {n : ℕ}, n ≤ card s → Finset.Nonempty (powersetLen n s)
n✝ : ℕ
h : n✝ ≤ card s
⊢ image (insert x) (powersetLen n✝ s) ⊆ powersetLen (Nat.succ n✝) s ∪ image (insert x) (powersetLen n✝ s)
Theorem: Submodule.exists_finset_of_mem_iSup
File: Mathlib/LinearAlgebra/Finsupp.lean

tactic: have :=
  CompleteLattice.IsCompactElement.exists_finset_of_le_iSup (Submodule R M)
    (Submodule.singleton_span_isCompactElement m) p
state_before: R : Type u_2
M : Type u_3
N : Type ?u.759278
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
ι : Type u_1
p : ι → Submodule R M
m : M
hm : m ∈ ⨆ (i : ι), p i
⊢ ∃ s, m ∈ ⨆ (i : ι) (_ : i ∈ s), p i

tactic: simp only [Submodule.span_singleton_le_iff_mem] at this
state_before: R : Type u_2
M : Type u_3
N : Type ?u.759278
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
ι : Type u_1
p : ι → Submodule R M
m : M
hm : m ∈ ⨆ (i : ι), p i
this : (span R {m} ≤ ⨆ (i : ι), p i) → ∃ s, span R {m} ≤ ⨆ (i : ι) (_ : i ∈ s), p i
⊢ ∃ s, m ∈ ⨆ (i : ι) (_ : i ∈ s), p i

tactic: exact this hm
state_before: R : Type u_2
M : Type u_3
N : Type ?u.759278
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
ι : Type u_1
p : ι → Submodule R M
m : M
hm : m ∈ ⨆ (i : ι), p i
this : (m ∈ ⨆ (i : ι), p i) → ∃ s, m ∈ ⨆ (i : ι) (_ : i ∈ s), p i
⊢ ∃ s, m ∈ ⨆ (i : ι) (_ : i ∈ s), p i
Theorem: LieAlgebra.Orthogonal.indefiniteDiagonal_assoc
File: Mathlib/Algebra/Lie/Classical.lean

tactic: ext (i j)
state_before: n : Type ?u.166573
p : Type ?u.166576
q : Type ?u.166579
l : Type u_1
R : Type u₂
inst✝⁷ : DecidableEq n
inst✝⁶ : DecidableEq p
inst✝⁵ : DecidableEq q
inst✝⁴ : DecidableEq l
inst✝³ : CommRing R
inst✝² : Fintype p
inst✝¹ : Fintype q
inst✝ : Fintype l
⊢ indefiniteDiagonal (Unit ⊕ l) l R =
    ↑(reindexLieEquiv (Equiv.sumAssoc Unit l l).symm) (fromBlocks 1 0 0 (indefiniteDiagonal l l R))

tactic: rcases i with ⟨⟨i₁ | i₂⟩ | i₃⟩ <;> rcases j with ⟨⟨j₁ | j₂⟩ | j₃⟩ <;>
  simp only [indefiniteDiagonal, Matrix.diagonal_apply, Equiv.sumAssoc_apply_inl_inl,
    Matrix.reindexLieEquiv_apply, Matrix.submatrix_apply, Equiv.symm_symm, Matrix.reindex_apply,
    Sum.elim_inl, if_true, eq_self_iff_true, Matrix.one_apply_eq, Matrix.fromBlocks_apply₁₁,
    DMatrix.zero_apply, Equiv.sumAssoc_apply_inl_inr, if_false, Matrix.fromBlocks_apply₁₂,
    Matrix.fromBlocks_apply₂₁, Matrix.fromBlocks_apply₂₂, Equiv.sumAssoc_apply_inr,
    Sum.elim_inr, Sum.inl_injective.eq_iff, Sum.inr_injective.eq_iff] <;>
  congr 1
state_before: case a.h
n : Type ?u.166573
p : Type ?u.166576
q : Type ?u.166579
l : Type u_1
R : Type u₂
inst✝⁷ : DecidableEq n
inst✝⁶ : DecidableEq p
inst✝⁵ : DecidableEq q
inst✝⁴ : DecidableEq l
inst✝³ : CommRing R
inst✝² : Fintype p
inst✝¹ : Fintype q
inst✝ : Fintype l
i j : (Unit ⊕ l) ⊕ l
⊢ indefiniteDiagonal (Unit ⊕ l) l R i j =
    ↑(reindexLieEquiv (Equiv.sumAssoc Unit l l).symm) (fromBlocks 1 0 0 (indefiniteDiagonal l l R)) i j
Theorem: Down.card_compression
File: Mathlib/Combinatorics/SetFamily/Compression/Down.lean

tactic: rw [compression, card_disjUnion, image_filter,
  card_image_of_injOn ((erase_injOn' _).mono fun s hs => _), ← card_disjoint_union]
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜✝ ℬ : Finset (Finset α)
s : Finset α
a✝ a : α
𝒜 : Finset (Finset α)
⊢ card (𝓓 a 𝒜) = card 𝒜

tactic: intro s hs
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜✝ ℬ : Finset (Finset α)
s : Finset α
a✝ a : α
𝒜 : Finset (Finset α)
⊢ ∀ (s : Finset α), s ∈ ↑(filter ((fun s => ¬s ∈ 𝒜) ∘ fun s => erase s a) 𝒜) → s ∈ {s | a ∈ s}

tactic: rw [mem_coe, mem_filter, Function.comp_apply] at hs
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜✝ ℬ : Finset (Finset α)
s✝ : Finset α
a✝ a : α
𝒜 : Finset (Finset α)
s : Finset α
hs : s ∈ ↑(filter ((fun s => ¬s ∈ 𝒜) ∘ fun s => erase s a) 𝒜)
⊢ s ∈ {s | a ∈ s}

tactic: exact not_imp_comm.1 erase_eq_of_not_mem (ne_of_mem_of_not_mem hs.1 hs.2).symm
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜✝ ℬ : Finset (Finset α)
s✝ : Finset α
a✝ a : α
𝒜 : Finset (Finset α)
s : Finset α
hs : s ∈ 𝒜 ∧ ¬erase s a ∈ 𝒜
⊢ s ∈ {s | a ∈ s}

tactic: conv_rhs => rw [← filter_union_filter_neg_eq (fun s => (erase s a ∈ 𝒜)) 𝒜]
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜✝ ℬ : Finset (Finset α)
s : Finset α
a✝ a : α
𝒜 : Finset (Finset α)
⊢ card (filter (fun s => erase s a ∈ 𝒜) 𝒜 ∪ filter ((fun s => ¬s ∈ 𝒜) ∘ fun s => erase s a) 𝒜) = card 𝒜

tactic: exact disjoint_filter_filter_neg 𝒜 𝒜 (fun s => (erase s a ∈ 𝒜))
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜✝ ℬ : Finset (Finset α)
s : Finset α
a✝ a : α
𝒜 : Finset (Finset α)
⊢ Disjoint (filter (fun s => erase s a ∈ 𝒜) 𝒜) (filter ((fun s => ¬s ∈ 𝒜) ∘ fun s => erase s a) 𝒜)
Theorem: Nat.coprime_one_left_iff
File: Mathlib/Data/Nat/GCD/Basic.lean

tactic: simp [coprime]
state_before: n : ℕ
⊢ coprime 1 n ↔ True
Theorem: Polynomial.map_ofNat
File: Mathlib/Data/Polynomial/Eval.lean

tactic: rw [Polynomial.map_nat_cast]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n✝ : ℕ
inst✝² : Semiring R
p q r : R[X]
inst✝¹ : Semiring S
f : R →+* S
n : ℕ
inst✝ : Nat.AtLeastTwo n
⊢ map f ↑n = ↑n
Theorem: Sym2.GameAdd.snd_fst
File: Mathlib/Order/GameAdd.lean

tactic: rw [Sym2.eq_swap]
state_before: α : Type u_1
β : Type ?u.6116
rα : α → α → Prop
rβ : β → β → Prop
a₁ a₂ b : α
h : rα a₁ a₂
⊢ GameAdd rα (Quotient.mk (Rel.setoid α) (b, a₁)) (Quotient.mk (Rel.setoid α) (a₂, b))

tactic: exact GameAdd.fst h
state_before: α : Type u_1
β : Type ?u.6116
rα : α → α → Prop
rβ : β → β → Prop
a₁ a₂ b : α
h : rα a₁ a₂
⊢ GameAdd rα (Quotient.mk (Rel.setoid α) (a₁, b)) (Quotient.mk (Rel.setoid α) (a₂, b))
Theorem: tendsto_zero_of_norm_tendsto_zero
File: Mathlib/NumberTheory/Padics/Hensel.lean

tactic: simpa using hnorm
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
ncs : CauSeq ℤ_[p] norm
F : Polynomial ℤ_[p]
hnorm : Tendsto (fun i => ‖Polynomial.eval (↑ncs i) F‖) atTop (𝓝 0)
⊢ Tendsto (fun e => ‖Polynomial.eval (↑ncs e) F - 0‖) atTop (𝓝 0)
Theorem: List.prod_inv_reverse
File: Mathlib/Data/List/BigOperators/Basic.lean

tactic: simp
state_before: ι : Type ?u.112709
α : Type ?u.112712
M : Type ?u.112715
N : Type ?u.112718
P : Type ?u.112721
M₀ : Type ?u.112724
G : Type u_1
R : Type ?u.112730
inst✝ : Group G
⊢ (prod [])⁻¹ = prod (reverse (map (fun x => x⁻¹) []))

tactic: simp [prod_inv_reverse xs]
state_before: ι : Type ?u.112709
α : Type ?u.112712
M : Type ?u.112715
N : Type ?u.112718
P : Type ?u.112721
M₀ : Type ?u.112724
G : Type u_1
R : Type ?u.112730
inst✝ : Group G
x : G
xs : List G
⊢ (prod (x :: xs))⁻¹ = prod (reverse (map (fun x => x⁻¹) (x :: xs)))
Theorem: Nat.setOf_pow_dvd_eq_Icc_factorization
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: ext
state_before: n p : ℕ
pp : Prime p
hn : n ≠ 0
⊢ {i | i ≠ 0 ∧ p ^ i ∣ n} = Set.Icc 1 (↑(factorization n) p)

tactic: simp [lt_succ_iff, one_le_iff_ne_zero, pp.pow_dvd_iff_le_factorization hn]
state_before: case h
n p : ℕ
pp : Prime p
hn : n ≠ 0
x✝ : ℕ
⊢ x✝ ∈ {i | i ≠ 0 ∧ p ^ i ∣ n} ↔ x✝ ∈ Set.Icc 1 (↑(factorization n) p)