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

tactic: rw [cof_eq_sInf_lsub]
state_before: α : Type ?u.28294
r : α → α → Prop
o : Ordinal
a : Cardinal
⊢ a ≤ cof o ↔ ∀ {ι : Type u} (f : ι → Ordinal), lsub f = o → a ≤ (#ι)

tactic: exact
  (le_csInf_iff'' (cof_lsub_def_nonempty o)).trans
    ⟨fun H ι f hf => H _ ⟨ι, f, hf, rfl⟩, fun H b ⟨ι, f, hf, hb⟩ => by
      rw [← hb]
      exact H _ hf⟩
state_before: α : Type ?u.28294
r : α → α → Prop
o : Ordinal
a : Cardinal
⊢ a ≤ sInf {a | ∃ ι f, lsub f = o ∧ (#ι) = a} ↔ ∀ {ι : Type u} (f : ι → Ordinal), lsub f = o → a ≤ (#ι)

tactic: rw [← hb]
state_before: α : Type ?u.28294
r : α → α → Prop
o : Ordinal
a : Cardinal
H : ∀ {ι : Type u} (f : ι → Ordinal), lsub f = o → a ≤ (#ι)
b : Cardinal
x✝ : b ∈ {a | ∃ ι f, lsub f = o ∧ (#ι) = a}
ι : Type u
f : ι → Ordinal
hf : lsub f = o
hb : (#ι) = b
⊢ a ≤ b

tactic: exact H _ hf
state_before: α : Type ?u.28294
r : α → α → Prop
o : Ordinal
a : Cardinal
H : ∀ {ι : Type u} (f : ι → Ordinal), lsub f = o → a ≤ (#ι)
b : Cardinal
x✝ : b ∈ {a | ∃ ι f, lsub f = o ∧ (#ι) = a}
ι : Type u
f : ι → Ordinal
hf : lsub f = o
hb : (#ι) = b
⊢ a ≤ (#ι)
Theorem: LinearMap.trace_id
File: Mathlib/LinearAlgebra/Trace.lean

tactic: rw [← one_eq_id, trace_one]
state_before: R : Type u_1
inst✝⁹ : CommRing R
M : Type u_2
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
N : Type ?u.396174
inst✝⁶ : AddCommGroup N
inst✝⁵ : Module R N
ι : Type ?u.396716
inst✝⁴ : Module.Free R M
inst✝³ : Module.Finite R M
inst✝² : Module.Free R N
inst✝¹ : Module.Finite R N
inst✝ : Nontrivial R
⊢ ↑(trace R M) id = ↑(finrank R M)
Theorem: List.disjoint_nil_right
File: Std/Data/List/Lemmas.lean

tactic: rw [disjoint_comm]
state_before: α : Type u_1
l : List α
⊢ Disjoint l []

tactic: exact disjoint_nil_left _
state_before: α : Type u_1
l : List α
⊢ Disjoint [] l
Theorem: Filter.inter_eventuallyEq_right
File: Mathlib/Order/Filter/Basic.lean

tactic: rw [inter_comm, inter_eventuallyEq_left]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.190687
ι : Sort x
s t : Set α
l : Filter α
⊢ s ∩ t =ᶠ[l] t ↔ ∀ᶠ (x : α) in l, x ∈ t → x ∈ s
Theorem: CommGroup.toGroup_injective
File: Mathlib/Algebra/Group/Defs.lean

tactic: rintro ⟨⟩ ⟨⟩ ⟨⟩
state_before: G✝ : Type ?u.58954
G : Type u
⊢ Injective (@toGroup G)

tactic: rfl
state_before: case mk.mk.refl
G✝ : Type ?u.58954
G : Type u
toGroup✝ : Group G
mul_comm✝¹ mul_comm✝ : ∀ (a b : G), a * b = b * a
⊢ mk mul_comm✝¹ = mk mul_comm✝
Theorem: RingHom.cancel_left
File: Mathlib/Algebra/Hom/Ring.lean

tactic: rw [← comp_apply, h, comp_apply]
state_before: F : Type ?u.110349
α : Type u_3
β : Type u_1
γ : Type u_2
x✝² : NonAssocSemiring α
x✝¹ : NonAssocSemiring β
x✝ : NonAssocSemiring γ
g : β →+* γ
f₁ f₂ : α →+* β
hg : Injective ↑g
h : comp g f₁ = comp g f₂
x : α
⊢ ↑g (↑f₁ x) = ↑g (↑f₂ x)
Theorem: ultrafilter_extend_eq_iff
File: Mathlib/Topology/StoneCech.lean

tactic: let b' : Ultrafilter (Ultrafilter α) := b.map pure
state_before: α : Type u
γ : Type u_1
inst✝² : TopologicalSpace γ
inst✝¹ : T2Space γ
inst✝ : CompactSpace γ
f : α → γ
b : Ultrafilter α
c : γ
h : Ultrafilter.extend f b = c
⊢ ↑(Ultrafilter.map f b) ≤ 𝓝 c

tactic: have t : ↑b' ≤ 𝓝 b := ultrafilter_converges_iff.mpr (bind_pure _).symm
state_before: α : Type u
γ : Type u_1
inst✝² : TopologicalSpace γ
inst✝¹ : T2Space γ
inst✝ : CompactSpace γ
f : α → γ
b : Ultrafilter α
c : γ
h : Ultrafilter.extend f b = c
b' : Ultrafilter (Ultrafilter α) := Ultrafilter.map pure b
⊢ ↑(Ultrafilter.map f b) ≤ 𝓝 c

tactic: rw [← h]
state_before: α : Type u
γ : Type u_1
inst✝² : TopologicalSpace γ
inst✝¹ : T2Space γ
inst✝ : CompactSpace γ
f : α → γ
b : Ultrafilter α
c : γ
h : Ultrafilter.extend f b = c
b' : Ultrafilter (Ultrafilter α) := Ultrafilter.map pure b
t : ↑b' ≤ 𝓝 b
⊢ ↑(Ultrafilter.map f b) ≤ 𝓝 c

tactic: have := (continuous_ultrafilter_extend f).tendsto b
state_before: α : Type u
γ : Type u_1
inst✝² : TopologicalSpace γ
inst✝¹ : T2Space γ
inst✝ : CompactSpace γ
f : α → γ
b : Ultrafilter α
c : γ
h : Ultrafilter.extend f b = c
b' : Ultrafilter (Ultrafilter α) := Ultrafilter.map pure b
t : ↑b' ≤ 𝓝 b
⊢ ↑(Ultrafilter.map f b) ≤ 𝓝 (Ultrafilter.extend f b)

tactic: refine' le_trans _ (le_trans (map_mono t) this)
state_before: α : Type u
γ : Type u_1
inst✝² : TopologicalSpace γ
inst✝¹ : T2Space γ
inst✝ : CompactSpace γ
f : α → γ
b : Ultrafilter α
c : γ
h : Ultrafilter.extend f b = c
b' : Ultrafilter (Ultrafilter α) := Ultrafilter.map pure b
t : ↑b' ≤ 𝓝 b
this : Tendsto (Ultrafilter.extend f) (𝓝 b) (𝓝 (Ultrafilter.extend f b))
⊢ ↑(Ultrafilter.map f b) ≤ 𝓝 (Ultrafilter.extend f b)

tactic: change _ ≤ map (Ultrafilter.extend f ∘ pure) ↑b
state_before: α : Type u
γ : Type u_1
inst✝² : TopologicalSpace γ
inst✝¹ : T2Space γ
inst✝ : CompactSpace γ
f : α → γ
b : Ultrafilter α
c : γ
h : Ultrafilter.extend f b = c
b' : Ultrafilter (Ultrafilter α) := Ultrafilter.map pure b
t : ↑b' ≤ 𝓝 b
this : Tendsto (Ultrafilter.extend f) (𝓝 b) (𝓝 (Ultrafilter.extend f b))
⊢ ↑(Ultrafilter.map f b) ≤ map (Ultrafilter.extend f) ↑b'

tactic: rw [ultrafilter_extend_extends]
state_before: α : Type u
γ : Type u_1
inst✝² : TopologicalSpace γ
inst✝¹ : T2Space γ
inst✝ : CompactSpace γ
f : α → γ
b : Ultrafilter α
c : γ
h : Ultrafilter.extend f b = c
b' : Ultrafilter (Ultrafilter α) := Ultrafilter.map pure b
t : ↑b' ≤ 𝓝 b
this : Tendsto (Ultrafilter.extend f) (𝓝 b) (𝓝 (Ultrafilter.extend f b))
⊢ ↑(Ultrafilter.map f b) ≤ map (Ultrafilter.extend f ∘ pure) ↑b

tactic: exact le_rfl
state_before: α : Type u
γ : Type u_1
inst✝² : TopologicalSpace γ
inst✝¹ : T2Space γ
inst✝ : CompactSpace γ
f : α → γ
b : Ultrafilter α
c : γ
h : Ultrafilter.extend f b = c
b' : Ultrafilter (Ultrafilter α) := Ultrafilter.map pure b
t : ↑b' ≤ 𝓝 b
this : Tendsto (Ultrafilter.extend f) (𝓝 b) (𝓝 (Ultrafilter.extend f b))
⊢ ↑(Ultrafilter.map f b) ≤ map f ↑b
Theorem: bihimp_bihimp_cancel_left
File: Mathlib/Order/SymmDiff.lean

tactic: simp [← bihimp_assoc]
state_before: ι : Type ?u.82316
α : Type u_1
β : Type ?u.82322
π : ι → Type ?u.82327
inst✝ : BooleanAlgebra α
a b c d : α
⊢ a ⇔ (a ⇔ b) = b
Theorem: Int.ModEq.pow_card_sub_one_eq_one
File: Mathlib/FieldTheory/Finite/Basic.lean

tactic: haveI : Fact p.Prime := ⟨hp⟩
state_before: K : Type ?u.1090717
R : Type ?u.1090720
p : ℕ
hp : Nat.Prime p
n : ℤ
hpn : IsCoprime n ↑p
⊢ n ^ (p - 1) ≡ 1 [ZMOD ↑p]

tactic: simpa [← ZMod.int_cast_eq_int_cast_iff] using ZMod.pow_card_sub_one_eq_one this
state_before: K : Type ?u.1090717
R : Type ?u.1090720
p : ℕ
hp : Nat.Prime p
n : ℤ
hpn : IsCoprime n ↑p
this✝ : Fact (Nat.Prime p)
this : ¬↑n = 0
⊢ n ^ (p - 1) ≡ 1 [ZMOD ↑p]

tactic: rw [CharP.int_cast_eq_zero_iff _ p, ← (Nat.prime_iff_prime_int.mp hp).coprime_iff_not_dvd]
state_before: K : Type ?u.1090717
R : Type ?u.1090720
p : ℕ
hp : Nat.Prime p
n : ℤ
hpn : IsCoprime n ↑p
this : Fact (Nat.Prime p)
⊢ ¬↑n = 0

tactic: exact hpn.symm
state_before: K : Type ?u.1090717
R : Type ?u.1090720
p : ℕ
hp : Nat.Prime p
n : ℤ
hpn : IsCoprime n ↑p
this : Fact (Nat.Prime p)
⊢ IsCoprime (↑p) n
Theorem: mem_nhds_subtype_iff_nhdsWithin
File: Mathlib/Topology/ContinuousOn.lean

tactic: rw [← map_nhds_subtype_val, image_mem_map_iff Subtype.val_injective]
state_before: α : Type u_1
β : Type ?u.304019
γ : Type ?u.304022
δ : Type ?u.304025
inst✝ : TopologicalSpace α
s : Set α
a : ↑s
t : Set ↑s
⊢ t ∈ 𝓝 a ↔ Subtype.val '' t ∈ 𝓝[s] ↑a
Theorem: AffineSubspace.not_sOppSide_self
File: Mathlib/Analysis/Convex/Side.lean

tactic: rw [SOppSide]
state_before: R : Type u_1
V : Type u_2
V' : Type ?u.231207
P : Type u_3
P' : Type ?u.231213
inst✝⁶ : LinearOrderedField R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
s : AffineSubspace R P
x : P
⊢ ¬SOppSide s x x

tactic: simp
state_before: R : Type u_1
V : Type u_2
V' : Type ?u.231207
P : Type u_3
P' : Type ?u.231213
inst✝⁶ : LinearOrderedField R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
s : AffineSubspace R P
x : P
⊢ ¬(WOppSide s x x ∧ ¬x ∈ s ∧ ¬x ∈ s)
Theorem: Metric.eventually_prod_nhds_iff
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: rw [eventually_swap_iff, Metric.eventually_nhds_prod_iff]
state_before: α : Type u
β : Type v
X : Type ?u.93290
ι : Type u_1
inst✝ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
f : Filter ι
x₀ : α
p : ι × α → Prop
⊢ (∀ᶠ (x : ι × α) in f ×ˢ 𝓝 x₀, p x) ↔
    ∃ pa, (∀ᶠ (i : ι) in f, pa i) ∧ ∃ ε, ε > 0 ∧ ∀ {i : ι}, pa i → ∀ {x : α}, dist x x₀ < ε → p (i, x)

tactic: rintro ⟨a1, a2, a3, a4, a5⟩
state_before: case mpr
α : Type u
β : Type v
X : Type ?u.93290
ι : Type u_1
inst✝ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
f : Filter ι
x₀ : α
p : ι × α → Prop
⊢ (∃ pa, (∀ᶠ (i : ι) in f, pa i) ∧ ∃ ε, ε > 0 ∧ ∀ {i : ι}, pa i → ∀ {x : α}, dist x x₀ < ε → p (i, x)) →
    ∃ ε, ε > 0 ∧ ∃ pa, (∀ᶠ (i : ι) in f, pa i) ∧ ∀ {x : α}, dist x x₀ < ε → ∀ {i : ι}, pa i → p (Prod.swap (x, i))

tactic: exact ⟨a3, a4, a1, a2, fun b1 b2 b3 => a5 b3 b1⟩
state_before: case mpr.intro.intro.intro.intro
α : Type u
β : Type v
X : Type ?u.93290
ι : Type u_1
inst✝ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
f : Filter ι
x₀ : α
p : ι × α → Prop
a1 : ι → Prop
a2 : ∀ᶠ (i : ι) in f, a1 i
a3 : ℝ
a4 : a3 > 0
a5 : ∀ {i : ι}, a1 i → ∀ {x : α}, dist x x₀ < a3 → p (i, x)
⊢ ∃ ε, ε > 0 ∧ ∃ pa, (∀ᶠ (i : ι) in f, pa i) ∧ ∀ {x : α}, dist x x₀ < ε → ∀ {i : ι}, pa i → p (Prod.swap (x, i))
Theorem: Ordinal.nat_cast_div
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: rcases eq_or_ne n 0 with (rfl | hn)
state_before: m n : ℕ
⊢ ↑(m / n) = ↑m / ↑n

tactic: simp
state_before: case inl
m : ℕ
⊢ ↑(m / 0) = ↑m / ↑0

tactic: have hn' := nat_cast_ne_zero.2 hn
state_before: case inr
m n : ℕ
hn : n ≠ 0
⊢ ↑(m / n) = ↑m / ↑n

tactic: apply le_antisymm
state_before: case inr
m n : ℕ
hn : n ≠ 0
hn' : ↑n ≠ 0
⊢ ↑(m / n) = ↑m / ↑n

tactic: rw [le_div hn', ← nat_cast_mul, nat_cast_le, mul_comm]
state_before: case inr.a
m n : ℕ
hn : n ≠ 0
hn' : ↑n ≠ 0
⊢ ↑(m / n) ≤ ↑m / ↑n

tactic: apply Nat.div_mul_le_self
state_before: case inr.a
m n : ℕ
hn : n ≠ 0
hn' : ↑n ≠ 0
⊢ m / n * n ≤ m

tactic: rw [div_le hn', ← add_one_eq_succ, ← Nat.cast_succ, ← nat_cast_mul, nat_cast_lt, mul_comm, ←
  Nat.div_lt_iff_lt_mul (Nat.pos_of_ne_zero hn)]
state_before: case inr.a
m n : ℕ
hn : n ≠ 0
hn' : ↑n ≠ 0
⊢ ↑m / ↑n ≤ ↑(m / n)

tactic: apply Nat.lt_succ_self
state_before: case inr.a
m n : ℕ
hn : n ≠ 0
hn' : ↑n ≠ 0
⊢ m / n < Nat.succ (m / n)
Theorem: Multiset.gcd_eq_zero_iff
File: Mathlib/Algebra/GCDMonoid/Multiset.lean

tactic: constructor
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s : Multiset α
⊢ gcd s = 0 ↔ ∀ (x : α), x ∈ s → x = 0

tactic: intro h x hx
state_before: case mp
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s : Multiset α
⊢ gcd s = 0 → ∀ (x : α), x ∈ s → x = 0

tactic: apply eq_zero_of_zero_dvd
state_before: case mp
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s : Multiset α
h : gcd s = 0
x : α
hx : x ∈ s
⊢ x = 0

tactic: rw [← h]
state_before: case mp.h
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s : Multiset α
h : gcd s = 0
x : α
hx : x ∈ s
⊢ 0 ∣ x

tactic: apply gcd_dvd hx
state_before: case mp.h
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s : Multiset α
h : gcd s = 0
x : α
hx : x ∈ s
⊢ gcd s ∣ x

tactic: refine' s.induction_on _ _
state_before: case mpr
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s : Multiset α
⊢ (∀ (x : α), x ∈ s → x = 0) → gcd s = 0

tactic: intro a s sgcd h
state_before: case mpr.refine'_2
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s : Multiset α
⊢ ∀ ⦃a : α⦄ {s : Multiset α},
    ((∀ (x : α), x ∈ s → x = 0) → gcd s = 0) → (∀ (x : α), x ∈ a ::ₘ s → x = 0) → gcd (a ::ₘ s) = 0

tactic: simp [h a (mem_cons_self a s), sgcd fun x hx ↦ h x (mem_cons_of_mem hx)]
state_before: case mpr.refine'_2
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s✝ : Multiset α
a : α
s : Multiset α
sgcd : (∀ (x : α), x ∈ s → x = 0) → gcd s = 0
h : ∀ (x : α), x ∈ a ::ₘ s → x = 0
⊢ gcd (a ::ₘ s) = 0

tactic: simp
state_before: case mpr.refine'_1
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s : Multiset α
⊢ (∀ (x : α), x ∈ 0 → x = 0) → gcd 0 = 0
Theorem: convex_ball
File: Mathlib/Analysis/Convex/Normed.lean

tactic: simpa only [Metric.ball, sep_univ] using (convexOn_univ_dist a).convex_lt r
state_before: ι : Type ?u.20959
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
s t : Set E
a : E
r : ℝ
⊢ Convex ℝ (ball a r)
Theorem: Pmf.support_bernoulli
File: Mathlib/Probability/ProbabilityMassFunction/Constructions.lean

tactic: refine' Set.ext fun b => _
state_before: α : Type ?u.168514
β : Type ?u.168517
γ : Type ?u.168520
p : ℝ≥0∞
h : p ≤ 1
b : Bool
⊢ support (bernoulli p h) = {b | bif b then p ≠ 0 else p ≠ 1}

tactic: induction b
state_before: α : Type ?u.168514
β : Type ?u.168517
γ : Type ?u.168520
p : ℝ≥0∞
h : p ≤ 1
b✝ b : Bool
⊢ b ∈ support (bernoulli p h) ↔ b ∈ {b | bif b then p ≠ 0 else p ≠ 1}

tactic: simp_rw [mem_support_iff, bernoulli_apply, Bool.cond_false, Ne.def, tsub_eq_zero_iff_le, not_le]
state_before: case false
α : Type ?u.168514
β : Type ?u.168517
γ : Type ?u.168520
p : ℝ≥0∞
h : p ≤ 1
b : Bool
⊢ false ∈ support (bernoulli p h) ↔ false ∈ {b | bif b then p ≠ 0 else p ≠ 1}

tactic: exact ⟨ne_of_lt, lt_of_le_of_ne h⟩
state_before: case false
α : Type ?u.168514
β : Type ?u.168517
γ : Type ?u.168520
p : ℝ≥0∞
h : p ≤ 1
b : Bool
⊢ p < 1 ↔ false ∈ {b | bif b then ¬p = 0 else ¬p = 1}

tactic: simp only [mem_support_iff, bernoulli_apply, Bool.cond_true, Set.mem_setOf_eq]
state_before: case true
α : Type ?u.168514
β : Type ?u.168517
γ : Type ?u.168520
p : ℝ≥0∞
h : p ≤ 1
b : Bool
⊢ true ∈ support (bernoulli p h) ↔ true ∈ {b | bif b then p ≠ 0 else p ≠ 1}
Theorem: Int.sub_neg
File: Std/Data/Int/Lemmas.lean

tactic: simp [Int.sub_eq_add_neg]
state_before: a b : Int
⊢ a - -b = a + b
Theorem: affineIndependent_iff_not_finrank_vectorSpan_le
File: Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean

tactic: rw [affineIndependent_iff_le_finrank_vectorSpan k p hc, ← Nat.lt_iff_add_one_le, lt_iff_not_ge]
state_before: k : Type u_2
V : Type u_3
P : Type u_4
ι : Type u_1
inst✝⁴ : DivisionRing k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
inst✝ : Fintype ι
p : ι → P
n : ℕ
hc : Fintype.card ι = n + 2
⊢ AffineIndependent k p ↔ ¬finrank k { x // x ∈ vectorSpan k (Set.range p) } ≤ n
Theorem: Real.sinh_sq
File: Mathlib/Data/Complex/Exponential.lean

tactic: rw [← ofReal_inj]
state_before: x y : ℝ
⊢ sinh x ^ 2 = cosh x ^ 2 - 1

tactic: simp [sinh_sq]
state_before: x y : ℝ
⊢ ↑(sinh x ^ 2) = ↑(cosh x ^ 2 - 1)
Theorem: Real.toNNReal_le_toNNReal_iff
File: Mathlib/Data/Real/NNReal.lean

tactic: simp [← NNReal.coe_le_coe, hp]
state_before: r p : ℝ
hp : 0 ≤ p
⊢ toNNReal r ≤ toNNReal p ↔ r ≤ p
Theorem: Complex.tan_add
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean

tactic: rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩)
state_before: x y : ℂ
h :
  ((∀ (k : ℤ), x ≠ (2 * ↑k + 1) * ↑π / 2) ∧ ∀ (l : ℤ), y ≠ (2 * ↑l + 1) * ↑π / 2) ∨
    (∃ k, x = (2 * ↑k + 1) * ↑π / 2) ∧ ∃ l, y = (2 * ↑l + 1) * ↑π / 2
⊢ tan (x + y) = (tan x + tan y) / (1 - tan x * tan y)

tactic: rw [tan, sin_add, cos_add, ←
  div_div_div_cancel_right (sin x * cos y + cos x * sin y)
    (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)),
  add_div, sub_div]
state_before: case inl.intro
x y : ℂ
h1 : ∀ (k : ℤ), x ≠ (2 * ↑k + 1) * ↑π / 2
h2 : ∀ (l : ℤ), y ≠ (2 * ↑l + 1) * ↑π / 2
⊢ tan (x + y) = (tan x + tan y) / (1 - tan x * tan y)

tactic: simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1),
  div_self (cos_ne_zero_iff.mpr h2)]
state_before: case inl.intro
x y : ℂ
h1 : ∀ (k : ℤ), x ≠ (2 * ↑k + 1) * ↑π / 2
h2 : ∀ (l : ℤ), y ≠ (2 * ↑l + 1) * ↑π / 2
⊢ (sin x * cos y / (cos x * cos y) + cos x * sin y / (cos x * cos y)) /
      (cos x * cos y / (cos x * cos y) - sin x * sin y / (cos x * cos y)) =
    (tan x + tan y) / (1 - tan x * tan y)

tactic: haveI t := tan_int_mul_pi_div_two
state_before: case inr.intro.intro.intro
k l : ℤ
⊢ tan ((2 * ↑k + 1) * ↑π / 2 + (2 * ↑l + 1) * ↑π / 2) =
    (tan ((2 * ↑k + 1) * ↑π / 2) + tan ((2 * ↑l + 1) * ↑π / 2)) /
      (1 - tan ((2 * ↑k + 1) * ↑π / 2) * tan ((2 * ↑l + 1) * ↑π / 2))

tactic: obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1))
state_before: case inr.intro.intro.intro
k l : ℤ
t : ∀ (n : ℤ), tan (↑n * ↑π / 2) = 0
⊢ tan ((2 * ↑k + 1) * ↑π / 2 + (2 * ↑l + 1) * ↑π / 2) =
    (tan ((2 * ↑k + 1) * ↑π / 2) + tan ((2 * ↑l + 1) * ↑π / 2)) /
      (1 - tan ((2 * ↑k + 1) * ↑π / 2) * tan ((2 * ↑l + 1) * ↑π / 2))

tactic: simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy
state_before: case inr.intro.intro.intro
k l : ℤ
t : ∀ (n : ℤ), tan (↑n * ↑π / 2) = 0
hx : tan (↑(2 * k + 1) * ↑π / 2) = 0
hy : tan (↑(2 * l + 1) * ↑π / 2) = 0
hxy : tan (↑(2 * k + 1 + (2 * l + 1)) * ↑π / 2) = 0
⊢ tan ((2 * ↑k + 1) * ↑π / 2 + (2 * ↑l + 1) * ↑π / 2) =
    (tan ((2 * ↑k + 1) * ↑π / 2) + tan ((2 * ↑l + 1) * ↑π / 2)) /
      (1 - tan ((2 * ↑k + 1) * ↑π / 2) * tan ((2 * ↑l + 1) * ↑π / 2))

tactic: rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ←
  add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy]
state_before: case inr.intro.intro.intro
k l : ℤ
t : ∀ (n : ℤ), tan (↑n * ↑π / 2) = 0
hx : tan ((2 * ↑k + 1) * ↑π / 2) = 0
hy : tan ((2 * ↑l + 1) * ↑π / 2) = 0
hxy : tan ((2 * ↑k + 1 + (2 * ↑l + 1)) * ↑π / 2) = 0
⊢ tan ((2 * ↑k + 1) * ↑π / 2 + (2 * ↑l + 1) * ↑π / 2) =
    (tan ((2 * ↑k + 1) * ↑π / 2) + tan ((2 * ↑l + 1) * ↑π / 2)) /
      (1 - tan ((2 * ↑k + 1) * ↑π / 2) * tan ((2 * ↑l + 1) * ↑π / 2))
Theorem: Int.natAbs_inj_of_nonpos_of_nonpos
File: Mathlib/Data/Int/Lemmas.lean

tactic: simpa only [Int.natAbs_neg, neg_inj] using
  natAbs_inj_of_nonneg_of_nonneg (neg_nonneg_of_nonpos ha) (neg_nonneg_of_nonpos hb)
state_before: a✝ b✝ : ℤ
n : ℕ
a b : ℤ
ha : a ≤ 0
hb : b ≤ 0
⊢ natAbs a = natAbs b ↔ a = b
Theorem: Nat.even_sub'
File: Mathlib/Data/Nat/Parity.lean

tactic: rw [even_sub h, even_iff_not_odd, even_iff_not_odd, not_iff_not]
state_before: m n : ℕ
h : n ≤ m
⊢ Even (m - n) ↔ (Odd m ↔ Odd n)
Theorem: Equiv.Perm.extendDomain_apply_not_subtype
File: Mathlib/Logic/Equiv/Basic.lean

tactic: simp [Perm.extendDomain, h]
state_before: α' : Type u_2
β' : Type u_1
e : Perm α'
p : β' → Prop
inst✝ : DecidablePred p
f : α' ≃ Subtype p
b : β'
h : ¬p b
⊢ ↑(extendDomain e f) b = b
Theorem: Finpartition.mem_atomise
File: Mathlib/Order/Partition/Finpartition.lean

tactic: simp only [atomise, ofErase, bot_eq_empty, mem_erase, mem_image, nonempty_iff_ne_empty,
  mem_singleton, and_comm, mem_powerset, exists_prop]
state_before: α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
P : Finpartition s
F : Finset (Finset α)
⊢ t ∈ (atomise s F).parts ↔ Finset.Nonempty t ∧ ∃ Q x, filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ Q ↔ i ∈ u)) s = t
Theorem: LinearMap.lTensor_comp
File: Mathlib/LinearAlgebra/TensorProduct.lean

tactic: ext (m n)
state_before: R : Type u_4
inst✝¹⁴ : CommSemiring R
R' : Type ?u.1235162
inst✝¹³ : Monoid R'
R'' : Type ?u.1235168
inst✝¹² : Semiring R''
M : Type u_1
N : Type u_2
P : Type u_5
Q : Type u_3
S : Type ?u.1235186
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid N
inst✝⁹ : AddCommMonoid P
inst✝⁸ : AddCommMonoid Q
inst✝⁷ : AddCommMonoid S
inst✝⁶ : Module R M
inst✝⁵ : Module R N
inst✝⁴ : Module R P
inst✝³ : Module R Q
inst✝² : Module R S
inst✝¹ : DistribMulAction R' M
inst✝ : Module R'' M
g : P →ₗ[R] Q
f : N →ₗ[R] P
⊢ lTensor M (comp g f) = comp (lTensor M g) (lTensor M f)

tactic: simp only [compr₂_apply, mk_apply, comp_apply, lTensor_tmul]
state_before: case H.h.h
R : Type u_4
inst✝¹⁴ : CommSemiring R
R' : Type ?u.1235162
inst✝¹³ : Monoid R'
R'' : Type ?u.1235168
inst✝¹² : Semiring R''
M : Type u_1
N : Type u_2
P : Type u_5
Q : Type u_3
S : Type ?u.1235186
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid N
inst✝⁹ : AddCommMonoid P
inst✝⁸ : AddCommMonoid Q
inst✝⁷ : AddCommMonoid S
inst✝⁶ : Module R M
inst✝⁵ : Module R N
inst✝⁴ : Module R P
inst✝³ : Module R Q
inst✝² : Module R S
inst✝¹ : DistribMulAction R' M
inst✝ : Module R'' M
g : P →ₗ[R] Q
f : N →ₗ[R] P
m : M
n : N
⊢ ↑(↑(compr₂ (TensorProduct.mk R M N) (lTensor M (comp g f))) m) n =
    ↑(↑(compr₂ (TensorProduct.mk R M N) (comp (lTensor M g) (lTensor M f))) m) n
Theorem: CategoryTheory.MonoidalCategory.pentagon_inv
File: Mathlib/CategoryTheory/Monoidal/Category.lean

tactic: simp [pentagon]
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✝ W X Y Z : C
⊢ inv ((𝟙 W ⊗ (α_ X Y Z).inv) ≫ (α_ W (X ⊗ Y) Z).inv ≫ ((α_ W X Y).inv ⊗ 𝟙 Z)) =
    inv ((α_ W X (Y ⊗ Z)).inv ≫ (α_ (W ⊗ X) Y Z).inv)
Theorem: Bool.cond_not
File: Mathlib/Data/Bool/Basic.lean

tactic: cases b <;> rfl
state_before: α : Type u_1
b : Bool
t e : α
⊢ (bif !b then t else e) = bif b then e else t
Theorem: Algebra.right_comm
File: Mathlib/Algebra/Algebra/Basic.lean

tactic: rw [mul_assoc, commutes, ← mul_assoc]
state_before: R : Type u
S : Type v
A : Type w
B : Type ?u.296946
inst✝⁵ : CommSemiring R
inst✝⁴ : CommSemiring S
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
x : A
r : R
y : A
⊢ x * ↑(algebraMap R A) r * y = x * y * ↑(algebraMap R A) r