tasksource/leandojo huggingface dataset:
Theorem: ModularGroup.coe_T_zpow
File: Mathlib/LinearAlgebra/Matrix/SpecialLinearGroup.lean

tactic: induction' n using Int.induction_on with n h n h
state_before: n : ℤ
⊢ ↑(T ^ n) = ↑of ![![1, n], ![0, 1]]

tactic: rw [zpow_zero, coe_one, Matrix.one_fin_two]
state_before: case hz

⊢ ↑(T ^ 0) = ↑of ![![1, 0], ![0, 1]]

tactic: simp_rw [zpow_add, zpow_one, coe_mul, h, coe_T, Matrix.mul_fin_two]
state_before: case hp
n : ℕ
h : ↑(T ^ ↑n) = ↑of ![![1, ↑n], ![0, 1]]
⊢ ↑(T ^ (↑n + 1)) = ↑of ![![1, ↑n + 1], ![0, 1]]

tactic: ring_nf
state_before: case hp
n : ℕ
h : ↑(T ^ ↑n) = ↑of ![![1, ↑n], ![0, 1]]
⊢ ↑of ![![1 * 1 + ↑n * 0, 1 * 1 + ↑n * 1], ![0 * 1 + 1 * 0, 0 * 1 + 1 * 1]] = ↑of ![![1, ↑n + 1], ![0, 1]]

tactic: simp_rw [zpow_sub, zpow_one, coe_mul, h, coe_T_inv, Matrix.mul_fin_two]
state_before: case hn
n : ℕ
h : ↑(T ^ (-↑n)) = ↑of ![![1, -↑n], ![0, 1]]
⊢ ↑(T ^ (-↑n - 1)) = ↑of ![![1, -↑n - 1], ![0, 1]]

tactic: ring_nf
state_before: case hn
n : ℕ
h : ↑(T ^ (-↑n)) = ↑of ![![1, -↑n], ![0, 1]]
⊢ ↑of ![![1 * 1 + -↑n * 0, 1 * -1 + -↑n * 1], ![0 * 1 + 1 * 0, 0 * -1 + 1 * 1]] = ↑of ![![1, -↑n - 1], ![0, 1]]
Theorem: Cardinal.mk_finsupp_nat
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: simp
state_before: α : Type u
inst✝ : Nonempty α
⊢ (#α →₀ ℕ) = max (#α) ℵ₀
Theorem: Finset.subset_insert_iff
File: Mathlib/Data/Finset/Basic.lean

tactic: simp only [subset_iff, or_iff_not_imp_left, mem_erase, mem_insert, and_imp]
state_before: α : Type u_1
β : Type ?u.217477
γ : Type ?u.217480
inst✝ : DecidableEq α
s✝ t✝ u v : Finset α
a✝ b a : α
s t : Finset α
⊢ s ⊆ insert a t ↔ erase s a ⊆ t

tactic: exact forall_congr' fun x => forall_swap
state_before: α : Type u_1
β : Type ?u.217477
γ : Type ?u.217480
inst✝ : DecidableEq α
s✝ t✝ u v : Finset α
a✝ b a : α
s t : Finset α
⊢ (∀ ⦃x : α⦄, x ∈ s → ¬x = a → x ∈ t) ↔ ∀ ⦃x : α⦄, x ≠ a → x ∈ s → x ∈ t
Theorem: Set.seq_singleton
File: Mathlib/Data/Set/Lattice.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.269744
ι : Sort ?u.269747
ι' : Sort ?u.269750
ι₂ : Sort ?u.269753
κ : ι → Sort ?u.269758
κ₁ : ι → Sort ?u.269763
κ₂ : ι → Sort ?u.269768
κ' : ι' → Sort ?u.269773
s : Set (α → β)
a : α
⊢ ∀ (x : β), x ∈ seq s {a} ↔ x ∈ (fun f => f a) '' s
Theorem: MeasureTheory.restrict_trim
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: refine @Measure.ext _ m _ _ (fun t ht => ?_)
state_before: α : Type u_1
β : Type ?u.3499198
γ : Type ?u.3499201
δ : Type ?u.3499204
ι : Type ?u.3499207
R : Type ?u.3499210
R' : Type ?u.3499213
m m0 : MeasurableSpace α
μ✝ : Measure α
s : Set α
hm : m ≤ m0
μ : Measure α
hs : MeasurableSet s
⊢ Measure.restrict (trim μ hm) s = trim (Measure.restrict μ s) hm

tactic: rw [@Measure.restrict_apply α m _ _ _ ht, trim_measurableSet_eq hm ht,
  Measure.restrict_apply (hm t ht),
  trim_measurableSet_eq hm (@MeasurableSet.inter α m t s ht hs)]
state_before: α : Type u_1
β : Type ?u.3499198
γ : Type ?u.3499201
δ : Type ?u.3499204
ι : Type ?u.3499207
R : Type ?u.3499210
R' : Type ?u.3499213
m m0 : MeasurableSpace α
μ✝ : Measure α
s : Set α
hm : m ≤ m0
μ : Measure α
hs : MeasurableSet s
t : Set α
ht : MeasurableSet t
⊢ ↑↑(Measure.restrict (trim μ hm) s) t = ↑↑(trim (Measure.restrict μ s) hm) t
Theorem: Bool.ofNat_le_ofNat
File: Mathlib/Data/Bool/Basic.lean

tactic: simp only [ofNat, ne_eq, _root_.decide_not]
state_before: n m : ℕ
h : n ≤ m
⊢ ofNat n ≤ ofNat m

tactic: cases Nat.decEq n 0 with
| isTrue hn => rw [decide_eq_true hn]; exact false_le
| isFalse hn =>
  cases Nat.decEq m 0 with
  | isFalse hm => rw [decide_eq_false hm]; exact le_true
  | isTrue hm => subst hm; have h := le_antisymm h (Nat.zero_le n); contradiction
state_before: n m : ℕ
h : n ≤ m
⊢ (!decide (n = 0)) ≤ !decide (m = 0)

tactic: rw [decide_eq_true hn]
state_before: case isTrue
n m : ℕ
h : n ≤ m
hn : n = 0
⊢ (!decide (n = 0)) ≤ !decide (m = 0)

tactic: exact false_le
state_before: case isTrue
n m : ℕ
h : n ≤ m
hn : n = 0
⊢ (!true) ≤ !decide (m = 0)

tactic: cases Nat.decEq m 0 with
| isFalse hm => rw [decide_eq_false hm]; exact le_true
| isTrue hm => subst hm; have h := le_antisymm h (Nat.zero_le n); contradiction
state_before: case isFalse
n m : ℕ
h : n ≤ m
hn : ¬n = 0
⊢ (!decide (n = 0)) ≤ !decide (m = 0)

tactic: rw [decide_eq_false hm]
state_before: case isFalse.isFalse
n m : ℕ
h : n ≤ m
hn : ¬n = 0
hm : ¬m = 0
⊢ (!decide (n = 0)) ≤ !decide (m = 0)

tactic: exact le_true
state_before: case isFalse.isFalse
n m : ℕ
h : n ≤ m
hn : ¬n = 0
hm : ¬m = 0
⊢ (!decide (n = 0)) ≤ !false

tactic: subst hm
state_before: case isFalse.isTrue
n m : ℕ
h : n ≤ m
hn : ¬n = 0
hm : m = 0
⊢ (!decide (n = 0)) ≤ !decide (m = 0)

tactic: have h := le_antisymm h (Nat.zero_le n)
state_before: case isFalse.isTrue
n : ℕ
hn : ¬n = 0
h : n ≤ 0
⊢ (!decide (n = 0)) ≤ !decide (0 = 0)

tactic: contradiction
state_before: case isFalse.isTrue
n : ℕ
hn : ¬n = 0
h✝ : n ≤ 0
h : n = 0
⊢ (!decide (n = 0)) ≤ !decide (0 = 0)
Theorem: Set.ordT5Nhd_mem_nhdsSet
File: Mathlib/Topology/Algebra/Order/T5.lean

tactic: rw [← mem_interior_iff_mem_nhds, interior_compl]
state_before: X : Type u_1
inst✝² : LinearOrder X
inst✝¹ : TopologicalSpace X
inst✝ : OrderTopology X
a b c : X
s t : Set X
hd : Disjoint s (closure t)
x : X
hx : x ∈ s
⊢ tᶜ ∈ 𝓝 x

tactic: exact disjoint_left.1 hd hx
state_before: X : Type u_1
inst✝² : LinearOrder X
inst✝¹ : TopologicalSpace X
inst✝ : OrderTopology X
a b c : X
s t : Set X
hd : Disjoint s (closure t)
x : X
hx : x ∈ s
⊢ x ∈ closure tᶜ
Theorem: SimpleGraph.singletonSubgraph_fst_le_subgraphOfAdj
File: Mathlib/Combinatorics/SimpleGraph/Subgraph.lean

tactic: constructor <;> simp [-Set.bot_eq_empty]
state_before: ι : Sort ?u.226800
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
u v : V
h : Adj G u v
⊢ SimpleGraph.singletonSubgraph G u ≤ subgraphOfAdj G h

tactic: exact fun _ _ ↦ False.elim
state_before: case right
ι : Sort ?u.226800
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
u v : V
h : Adj G u v
⊢ ∀ ⦃v_1 w : V⦄, ⊥ → u = v_1 ∧ v = w ∨ u = w ∧ v = v_1
Theorem: Monotone.le_csInf_image
File: Mathlib/Order/ConditionallyCompleteLattice/Basic.lean

tactic: let f' : αᵒᵈ → βᵒᵈ := f
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.98153
ι : Sort ?u.98156
inst✝¹ : Preorder α
inst✝ : ConditionallyCompleteLattice β
f : α → β
h_mono : Monotone f
s : Set α
hs : Set.Nonempty s
B : α
hB : B ∈ lowerBounds s
⊢ f B ≤ sInf (f '' s)

tactic: exact @csSup_image_le αᵒᵈ βᵒᵈ _ _ _
  (show Monotone f' from fun x y hxy => h_mono hxy) _ hs _ hB
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.98153
ι : Sort ?u.98156
inst✝¹ : Preorder α
inst✝ : ConditionallyCompleteLattice β
f : α → β
h_mono : Monotone f
s : Set α
hs : Set.Nonempty s
B : α
hB : B ∈ lowerBounds s
f' : αᵒᵈ → βᵒᵈ := f
⊢ f B ≤ sInf (f '' s)
Theorem: denomsClearable_zero
File: Mathlib/Data/Polynomial/DenomsClearable.lean

tactic: simp only [eval_zero, RingHom.map_zero, MulZeroClass.mul_zero, Polynomial.map_zero]
state_before: R : Type u_2
K : Type u_1
inst✝¹ : Semiring R
inst✝ : CommSemiring K
i : R →+* K
a✝ b : R
bi : K
N : ℕ
a : R
bu : bi * ↑i b = 1
⊢ ↑i 0 = ↑i b ^ N * eval (↑i a * bi) (Polynomial.map i 0)
Theorem: Nat.ceil_one
File: Mathlib/Algebra/Order/Floor.lean

tactic: rw [← Nat.cast_one, ceil_natCast]
state_before: F : Type ?u.52302
α : Type u_1
β : Type ?u.52308
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a : α
n : ℕ
⊢ ⌈1⌉₊ = 1
Theorem: Set.pred_ncard_le_ncard_diff_singleton
File: Mathlib/Data/Set/Ncard.lean

tactic: cases' s.finite_or_infinite with hs hs
state_before: α : Type u_1
β : Type ?u.18254
s✝ t : Set α
a✝ b x y : α
f : α → β
s : Set α
a : α
⊢ ncard s - 1 ≤ ncard (s \ {a})

tactic: convert Nat.zero_le _
state_before: case inr
α : Type u_1
β : Type ?u.18254
s✝ t : Set α
a✝ b x y : α
f : α → β
s : Set α
a : α
hs : Set.Infinite s
⊢ ncard s - 1 ≤ ncard (s \ {a})

tactic: rw [hs.ncard]
state_before: case h.e'_3
α : Type u_1
β : Type ?u.18254
s✝ t : Set α
a✝ b x y : α
f : α → β
s : Set α
a : α
hs : Set.Infinite s
⊢ ncard s - 1 = 0

tactic: by_cases h : a ∈ s
state_before: case inl
α : Type u_1
β : Type ?u.18254
s✝ t : Set α
a✝ b x y : α
f : α → β
s : Set α
a : α
hs : Set.Finite s
⊢ ncard s - 1 ≤ ncard (s \ {a})

tactic: rw [diff_singleton_eq_self h]
state_before: case neg
α : Type u_1
β : Type ?u.18254
s✝ t : Set α
a✝ b x y : α
f : α → β
s : Set α
a : α
hs : Set.Finite s
h : ¬a ∈ s
⊢ ncard s - 1 ≤ ncard (s \ {a})

tactic: apply Nat.pred_le
state_before: case neg
α : Type u_1
β : Type ?u.18254
s✝ t : Set α
a✝ b x y : α
f : α → β
s : Set α
a : α
hs : Set.Finite s
h : ¬a ∈ s
⊢ ncard s - 1 ≤ ncard s

tactic: rw [ncard_diff_singleton_of_mem h hs]
state_before: case pos
α : Type u_1
β : Type ?u.18254
s✝ t : Set α
a✝ b x y : α
f : α → β
s : Set α
a : α
hs : Set.Finite s
h : a ∈ s
⊢ ncard s - 1 ≤ ncard (s \ {a})
Theorem: Finset.Ico_eq_image_ssubsets
File: Mathlib/Data/Finset/Interval.lean

tactic: ext u
state_before: α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
h : s ⊆ t
⊢ Ico s t = image ((fun x x_1 => x ∪ x_1) s) (ssubsets (t \ s))

tactic: simp_rw [mem_Ico, mem_image, mem_ssubsets]
state_before: case a
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
h : s ⊆ t
u : Finset α
⊢ u ∈ Ico s t ↔ u ∈ image ((fun x x_1 => x ∪ x_1) s) (ssubsets (t \ s))

tactic: constructor
state_before: case a
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
h : s ⊆ t
u : Finset α
⊢ s ≤ u ∧ u < t ↔ ∃ a, a ⊂ t \ s ∧ s ∪ a = u

tactic: rintro ⟨hs, ht⟩
state_before: case a.mp
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
h : s ⊆ t
u : Finset α
⊢ s ≤ u ∧ u < t → ∃ a, a ⊂ t \ s ∧ s ∪ a = u

tactic: exact ⟨u \ s, sdiff_lt_sdiff_right ht hs, sup_sdiff_cancel_right hs⟩
state_before: case a.mp.intro
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
h : s ⊆ t
u : Finset α
hs : s ≤ u
ht : u < t
⊢ ∃ a, a ⊂ t \ s ∧ s ∪ a = u

tactic: rintro ⟨v, hv, rfl⟩
state_before: case a.mpr
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
h : s ⊆ t
u : Finset α
⊢ (∃ a, a ⊂ t \ s ∧ s ∪ a = u) → s ≤ u ∧ u < t

tactic: exact ⟨le_sup_left, sup_lt_of_lt_sdiff_left hv h⟩
state_before: case a.mpr.intro.intro
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
h : s ⊆ t
v : Finset α
hv : v ⊂ t \ s
⊢ s ≤ s ∪ v ∧ s ∪ v < t
Theorem: Mathlib.Tactic.Ring.neg_congr
File: Mathlib/Tactic/Ring/Basic.lean

tactic: subst_vars
state_before: u : Lean.Level
R✝ : Type ?u.398334
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝¹ : CommSemiring R✝
R : Type u_1
inst✝ : Ring R
a a' b : R
x✝¹ : a = a'
x✝ : -a' = b
⊢ -a = b

tactic: rfl
state_before: u : Lean.Level
R✝ : Type ?u.398334
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝¹ : CommSemiring R✝
R : Type u_1
inst✝ : Ring R
a' : R
⊢ -a' = -a'
Theorem: MeasureTheory.SignedMeasure.rnDeriv_sub
File: Mathlib/MeasureTheory/Decomposition/Lebesgue.lean

tactic: rw [sub_eq_add_neg] at hst
state_before: α : Type u_1
β : Type ?u.655633
m : MeasurableSpace α
μ✝ ν : Measure α
s✝ t✝ s t : SignedMeasure α
μ : Measure α
inst✝¹ : HaveLebesgueDecomposition s μ
inst✝ : HaveLebesgueDecomposition t μ
hst : HaveLebesgueDecomposition (s - t) μ
⊢ rnDeriv (s - t) μ =ᶠ[ae μ] rnDeriv s μ - rnDeriv t μ

tactic: rw [sub_eq_add_neg, sub_eq_add_neg]
state_before: α : Type u_1
β : Type ?u.655633
m : MeasurableSpace α
μ✝ ν : Measure α
s✝ t✝ s t : SignedMeasure α
μ : Measure α
inst✝¹ : HaveLebesgueDecomposition s μ
inst✝ : HaveLebesgueDecomposition t μ
hst : HaveLebesgueDecomposition (s + -t) μ
⊢ rnDeriv (s - t) μ =ᶠ[ae μ] rnDeriv s μ - rnDeriv t μ

tactic: exact ae_eq_trans (rnDeriv_add _ _ _) (Filter.EventuallyEq.add (ae_eq_refl _) (rnDeriv_neg _ _))
state_before: α : Type u_1
β : Type ?u.655633
m : MeasurableSpace α
μ✝ ν : Measure α
s✝ t✝ s t : SignedMeasure α
μ : Measure α
inst✝¹ : HaveLebesgueDecomposition s μ
inst✝ : HaveLebesgueDecomposition t μ
hst : HaveLebesgueDecomposition (s + -t) μ
⊢ rnDeriv (s + -t) μ =ᶠ[ae μ] rnDeriv s μ + -rnDeriv t μ
Theorem: Finset.strongDownwardInduction_eq
File: Mathlib/Data/Finset/Card.lean

tactic: rw [strongDownwardInduction]
state_before: α : Type u_1
β : Type ?u.88956
s✝ t : Finset α
f : α → β
n : ℕ
p : Finset α → Sort u_2
H : (t₁ : Finset α) → ({t₂ : Finset α} → card t₂ ≤ n → t₁ ⊂ t₂ → p t₂) → card t₁ ≤ n → p t₁
s : Finset α
⊢ strongDownwardInduction H s = H s fun {t} ht x => strongDownwardInduction H t ht
Theorem: Num.mem_ofZNum'
File: Mathlib/Data/Num/Lemmas.lean

tactic: cases m <;> constructor <;> intro h <;> try cases h <;> rfl
state_before: α : Type ?u.860822
m : Num
p : PosNum
⊢ pos p = m ↔ ZNum.pos p = toZNum m

tactic: cases h <;> rfl
state_before: case pos.mpr
α : Type ?u.860822
p a✝ : PosNum
h : ZNum.pos p = toZNum (pos a✝)
⊢ pos p = pos a✝

tactic: cases m <;> cases h
state_before: α : Type ?u.860822
m : Num
p : PosNum
h : ZNum.neg p = toZNum m
⊢ m ∈ ofZNum' (ZNum.neg p)
Theorem: PNat.Coprime.mul_right
File: Mathlib/Data/PNat/Prime.lean

tactic: repeat' rw [← coprime_coe]
state_before: k m n : ℕ+
⊢ Coprime k m → Coprime k n → Coprime k (m * n)

tactic: rw [mul_coe]
state_before: k m n : ℕ+
⊢ coprime ↑k ↑m → coprime ↑k ↑n → coprime ↑k ↑(m * n)

tactic: apply Nat.coprime.mul_right
state_before: k m n : ℕ+
⊢ coprime ↑k ↑m → coprime ↑k ↑n → coprime (↑k) (↑m * ↑n)

tactic: rw [← coprime_coe]
state_before: k m n : ℕ+
⊢ coprime ↑k ↑m → coprime ↑k ↑n → coprime ↑k ↑(m * n)
Theorem: CategoryTheory.Iso.commRingIsoToRingEquiv_symm_toRingHom
File: Mathlib/Algebra/Category/Ring/Basic.lean

tactic: ext
state_before: X Y : CommRingCat
i : X ≅ Y
⊢ RingEquiv.toRingHom (RingEquiv.symm (commRingCatIsoToRingEquiv i)) = i.inv

tactic: rfl
state_before: case a
X Y : CommRingCat
i : X ≅ Y
x✝ : ↑Y
⊢ ↑(RingEquiv.toRingHom (RingEquiv.symm (commRingCatIsoToRingEquiv i))) x✝ = ↑i.inv x✝
Theorem: Nat.minFac_pos
File: Mathlib/Data/Nat/Prime.lean

tactic: by_cases n1 : n = 1 <;> [exact n1.symm ▸ (by decide); exact (minFac_prime n1).pos]
state_before: n : ℕ
⊢ 0 < minFac n

tactic: decide
state_before: n : ℕ
n1 : n = 1
⊢ 0 < minFac 1
Theorem: OrthonormalBasis.repr_reindex
File: Mathlib/Analysis/InnerProductSpace/PiL2.lean

tactic: classical
rw [OrthonormalBasis.repr_apply_apply, b.repr_apply_apply, OrthonormalBasis.coe_reindex,
  comp_apply]
state_before: ι : Type u_1
ι' : Type u_4
𝕜 : Type u_2
inst✝¹⁰ : IsROrC 𝕜
E : Type u_3
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : InnerProductSpace 𝕜 E
E' : Type ?u.1236940
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : InnerProductSpace 𝕜 E'
F : Type ?u.1236958
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : InnerProductSpace ℝ F
F' : Type ?u.1236978
inst✝³ : NormedAddCommGroup F'
inst✝² : InnerProductSpace ℝ F'
inst✝¹ : Fintype ι
v : ι → E
inst✝ : Fintype ι'
b : OrthonormalBasis ι 𝕜 E
e : ι ≃ ι'
x : E
i' : ι'
⊢ ↑(reindex b e).repr x i' = ↑b.repr x (↑e.symm i')

tactic: rw [OrthonormalBasis.repr_apply_apply, b.repr_apply_apply, OrthonormalBasis.coe_reindex,
  comp_apply]
state_before: ι : Type u_1
ι' : Type u_4
𝕜 : Type u_2
inst✝¹⁰ : IsROrC 𝕜
E : Type u_3
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : InnerProductSpace 𝕜 E
E' : Type ?u.1236940
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : InnerProductSpace 𝕜 E'
F : Type ?u.1236958
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : InnerProductSpace ℝ F
F' : Type ?u.1236978
inst✝³ : NormedAddCommGroup F'
inst✝² : InnerProductSpace ℝ F'
inst✝¹ : Fintype ι
v : ι → E
inst✝ : Fintype ι'
b : OrthonormalBasis ι 𝕜 E
e : ι ≃ ι'
x : E
i' : ι'
⊢ ↑(reindex b e).repr x i' = ↑b.repr x (↑e.symm i')
Theorem: Finset.exists_subset_or_subset_of_two_mul_lt_card
File: Mathlib/Data/Finset/Card.lean

tactic: have h₁ : (X ∩ (Y \ X)).card = 0 := Finset.card_eq_zero.mpr (Finset.inter_sdiff_self X Y)
state_before: α : Type u_1
β : Type ?u.45753
s t : Finset α
f : α → β
n✝ : ℕ
inst✝ : DecidableEq α
X Y : Finset α
n : ℕ
hXY : 2 * n < card (X ∪ Y)
⊢ ∃ C, n < card C ∧ (C ⊆ X ∨ C ⊆ Y)

tactic: have h₂ : (X ∪ Y).card = X.card + (Y \ X).card := by
  rw [← card_union_add_card_inter X (Y \ X), Finset.union_sdiff_self_eq_union, h₁, add_zero]
state_before: α : Type u_1
β : Type ?u.45753
s t : Finset α
f : α → β
n✝ : ℕ
inst✝ : DecidableEq α
X Y : Finset α
n : ℕ
hXY : 2 * n < card (X ∪ Y)
h₁ : card (X ∩ (Y \ X)) = 0
⊢ ∃ C, n < card C ∧ (C ⊆ X ∨ C ⊆ Y)

tactic: rw [h₂, two_mul] at hXY
state_before: α : Type u_1
β : Type ?u.45753
s t : Finset α
f : α → β
n✝ : ℕ
inst✝ : DecidableEq α
X Y : Finset α
n : ℕ
hXY : 2 * n < card (X ∪ Y)
h₁ : card (X ∩ (Y \ X)) = 0
h₂ : card (X ∪ Y) = card X + card (Y \ X)
⊢ ∃ C, n < card C ∧ (C ⊆ X ∨ C ⊆ Y)

tactic: rcases lt_or_lt_of_add_lt_add hXY with (h | h)
state_before: α : Type u_1
β : Type ?u.45753
s t : Finset α
f : α → β
n✝ : ℕ
inst✝ : DecidableEq α
X Y : Finset α
n : ℕ
hXY : n + n < card X + card (Y \ X)
h₁ : card (X ∩ (Y \ X)) = 0
h₂ : card (X ∪ Y) = card X + card (Y \ X)
⊢ ∃ C, n < card C ∧ (C ⊆ X ∨ C ⊆ Y)

tactic: rw [← card_union_add_card_inter X (Y \ X), Finset.union_sdiff_self_eq_union, h₁, add_zero]
state_before: α : Type u_1
β : Type ?u.45753
s t : Finset α
f : α → β
n✝ : ℕ
inst✝ : DecidableEq α
X Y : Finset α
n : ℕ
hXY : 2 * n < card (X ∪ Y)
h₁ : card (X ∩ (Y \ X)) = 0
⊢ card (X ∪ Y) = card X + card (Y \ X)

tactic: exact ⟨X, h, Or.inl (Finset.Subset.refl X)⟩
state_before: case inl
α : Type u_1
β : Type ?u.45753
s t : Finset α
f : α → β
n✝ : ℕ
inst✝ : DecidableEq α
X Y : Finset α
n : ℕ
hXY : n + n < card X + card (Y \ X)
h₁ : card (X ∩ (Y \ X)) = 0
h₂ : card (X ∪ Y) = card X + card (Y \ X)
h : n < card X
⊢ ∃ C, n < card C ∧ (C ⊆ X ∨ C ⊆ Y)

tactic: exact ⟨Y \ X, h, Or.inr (Finset.sdiff_subset Y X)⟩
state_before: case inr
α : Type u_1
β : Type ?u.45753
s t : Finset α
f : α → β
n✝ : ℕ
inst✝ : DecidableEq α
X Y : Finset α
n : ℕ
hXY : n + n < card X + card (Y \ X)
h₁ : card (X ∩ (Y \ X)) = 0
h₂ : card (X ∪ Y) = card X + card (Y \ X)
h : n < card (Y \ X)
⊢ ∃ C, n < card C ∧ (C ⊆ X ∨ C ⊆ Y)
Theorem: toIocMod_neg
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: simp_rw [toIocMod, toIcoMod, toIocDiv_neg, neg_smul, add_smul]
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
⊢ toIocMod hp a (-b) = p - toIcoMod hp (-a) b

tactic: abel
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
⊢ -b - -(toIcoDiv hp (-a) b • p + 1 • p) = p - (b - toIcoDiv hp (-a) b • p)
Theorem: LinearMap.range_coprod
File: Mathlib/LinearAlgebra/Prod.lean

tactic: simp [mem_sup]
state_before: R : Type u
K : Type u'
M : Type v
V : Type v'
M₂ : Type w
V₂ : Type w'
M₃ : Type y
V₃ : Type y'
M₄ : Type z
ι : Type x
M₅ : Type ?u.158773
M₆ : Type ?u.158776
inst✝⁸ : Semiring R
inst✝⁷ : AddCommMonoid M
inst✝⁶ : AddCommMonoid M₂
inst✝⁵ : AddCommMonoid M₃
inst✝⁴ : AddCommMonoid M₄
inst✝³ : Module R M
inst✝² : Module R M₂
inst✝¹ : Module R M₃
inst✝ : Module R M₄
f : M →ₗ[R] M₃
g : M₂ →ₗ[R] M₃
x : M₃
⊢ x ∈ range (coprod f g) ↔ x ∈ range f ⊔ range g
Theorem: Polynomial.eval_geom_sum
File: Mathlib/Data/Polynomial/Eval.lean

tactic: simp [eval_finset_sum]
state_before: R✝ : Type u
S : Type v
T : Type w
ι : Type y
a b : R✝
m n✝ : ℕ
inst✝² : CommSemiring R✝
p q : R✝[X]
x✝ : R✝
inst✝¹ : CommSemiring S
f : R✝ →+* S
R : Type u_1
inst✝ : CommSemiring R
n : ℕ
x : R
⊢ eval x (∑ i in range n, X ^ i) = ∑ i in range n, x ^ i
Theorem: Multiset.Ico_filter_le
File: Mathlib/Data/Multiset/LocallyFinite.lean

tactic: rw [Ico, Ico, ← Finset.filter_val, Finset.Ico_filter_le]
state_before: α : Type u_1
inst✝¹ : LinearOrder α
inst✝ : LocallyFiniteOrder α
a✝ b✝ c✝ d a b c : α
⊢ filter (fun x => c ≤ x) (Ico a b) = Ico (max a c) b
Theorem: SimplicialObject.Splitting.πSummand_comp_ιSummand_comp_PInfty_eq_PInfty
File: Mathlib/AlgebraicTopology/DoldKan/SplitSimplicialObject.lean

tactic: conv_rhs => rw [← id_comp (PInfty.f n)]
state_before: C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
n : ℕ
⊢ πSummand s (IndexSet.id [n].op) ≫ ιSummand s (IndexSet.id [n].op) ≫ HomologicalComplex.Hom.f PInfty n =
    HomologicalComplex.Hom.f PInfty n

tactic: erw [s.decomposition_id, Preadditive.sum_comp]
state_before: C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
n : ℕ
⊢ πSummand s (IndexSet.id [n].op) ≫ ιSummand s (IndexSet.id [n].op) ≫ HomologicalComplex.Hom.f PInfty n =
    𝟙 (HomologicalComplex.X K[X] n) ≫ HomologicalComplex.Hom.f PInfty n

tactic: rw [Fintype.sum_eq_single (IndexSet.id (op [n])), assoc]
state_before: C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
n : ℕ
⊢ πSummand s (IndexSet.id [n].op) ≫ ιSummand s (IndexSet.id [n].op) ≫ HomologicalComplex.Hom.f PInfty n =
    ∑ j : IndexSet [n].op, (πSummand s j ≫ ιSummand s j) ≫ HomologicalComplex.Hom.f PInfty n

tactic: rintro A (hA : ¬A.EqId)
state_before: C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
n : ℕ
⊢ ∀ (x : IndexSet [n].op),
    x ≠ IndexSet.id [n].op → (πSummand s x ≫ ιSummand s x) ≫ HomologicalComplex.Hom.f PInfty n = 0

tactic: rw [assoc, s.ιSummand_comp_PInfty_eq_zero A hA, comp_zero]
state_before: C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
n : ℕ
A : IndexSet [n].op
hA : ¬IndexSet.EqId A
⊢ (πSummand s A ≫ ιSummand s A) ≫ HomologicalComplex.Hom.f PInfty n = 0
Theorem: FreeMonoid.count_of
File: Mathlib/Algebra/FreeMonoid/Count.lean

tactic: simp [count, countp_of, Pi.mulSingle_apply, eq_comm, Bool.beq_eq_decide_eq]
state_before: α : Type u_1
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidableEq α
x y : α
⊢ ↑(count x) (of y) = Pi.mulSingle x (↑Multiplicative.ofAdd 1) y
Theorem: MeasureTheory.OuterMeasure.coe_iSup
File: Mathlib/MeasureTheory/Measure/OuterMeasure.lean

tactic: simp
state_before: α : Type u_2
β : Type ?u.67774
R : Type ?u.67777
R' : Type ?u.67780
ms : Set (OuterMeasure α)
m : OuterMeasure α
ι : Sort u_1
f : ι → OuterMeasure α
s : Set α
⊢ ↑(⨆ (i : ι), f i) s = iSup (fun i => ↑(f i)) s
Theorem: Equiv.Perm.viaFintypeEmbedding_sign
File: Mathlib/Logic/Equiv/Fintype.lean

tactic: simp [Equiv.Perm.viaFintypeEmbedding]
state_before: α : Type u_1
β : Type u_2
inst✝³ : Fintype α
inst✝² : DecidableEq β
e : Perm α
f : α ↪ β
inst✝¹ : DecidableEq α
inst✝ : Fintype β
⊢ ↑sign (viaFintypeEmbedding e f) = ↑sign e
Theorem: CategoryTheory.Abelian.exact_of_is_kernel
File: Mathlib/CategoryTheory/Abelian/Exact.lean

tactic: refine' (exact_iff _ _).2 ⟨w, _⟩
state_before: C : Type u₁
inst✝¹ : Category C
inst✝ : Abelian C
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
h : IsLimit (KernelFork.ofι f w)
⊢ Exact f g

tactic: have := h.fac (KernelFork.ofι _ (kernel.condition g)) WalkingParallelPair.zero
state_before: C : Type u₁
inst✝¹ : Category C
inst✝ : Abelian C
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
h : IsLimit (KernelFork.ofι f w)
⊢ kernel.ι g ≫ cokernel.π f = 0

tactic: simp only [Fork.ofι_π_app] at this
state_before: C : Type u₁
inst✝¹ : Category C
inst✝ : Abelian C
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
h : IsLimit (KernelFork.ofι f w)
this :
  IsLimit.lift h (KernelFork.ofι (kernel.ι g) (_ : kernel.ι g ≫ g = 0)) ≫
      (KernelFork.ofι f w).π.app WalkingParallelPair.zero =
    (KernelFork.ofι (kernel.ι g) (_ : kernel.ι g ≫ g = 0)).π.app WalkingParallelPair.zero
⊢ kernel.ι g ≫ cokernel.π f = 0

tactic: rw [← this, Category.assoc, cokernel.condition, comp_zero]
state_before: C : Type u₁
inst✝¹ : Category C
inst✝ : Abelian C
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
h : IsLimit (KernelFork.ofι f w)
this : IsLimit.lift h (KernelFork.ofι (kernel.ι g) (_ : kernel.ι g ≫ g = 0)) ≫ f = kernel.ι g
⊢ kernel.ι g ≫ cokernel.π f = 0
Theorem: CategoryTheory.Biprod.ofComponents_eq
File: Mathlib/CategoryTheory/Preadditive/Biproducts.lean

tactic: apply biprod.hom_ext' <;> apply biprod.hom_ext <;>
  simp only [Category.comp_id, biprod.inr_fst, biprod.inr_snd, biprod.inl_snd, add_zero, zero_add,
    Biprod.inl_ofComponents, Biprod.inr_ofComponents, eq_self_iff_true, Category.assoc,
    comp_zero, biprod.inl_fst, Preadditive.add_comp]
state_before: C : Type u
inst✝² : Category C
inst✝¹ : Preadditive C
inst✝ : HasBinaryBiproducts C
X₁ X₂ Y₁ Y₂ : C
f₁₁ : X₁ ⟶ Y₁
f₁₂ : X₁ ⟶ Y₂
f₂₁ : X₂ ⟶ Y₁
f₂₂ : X₂ ⟶ Y₂
f : X₁ ⊞ X₂ ⟶ Y₁ ⊞ Y₂
⊢ ofComponents (biprod.inl ≫ f ≫ biprod.fst) (biprod.inl ≫ f ≫ biprod.snd) (biprod.inr ≫ f ≫ biprod.fst)
      (biprod.inr ≫ f ≫ biprod.snd) =
    f