tasksource/leandojo huggingface dataset:
Theorem: BoxIntegral.Prepartition.restrict_biUnion
File: Mathlib/Analysis/BoxIntegral/Partition/Basic.lean

tactic: refine' (eq_of_boxes_subset_iUnion_superset (fun J₁ h₁ => _) _).symm
state_before: ι : Type u_1
I J J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J
hJ : J ∈ π
⊢ restrict (biUnion π πi) J = πi J

tactic: refine' (mem_restrict _).2 ⟨J₁, π.mem_biUnion.2 ⟨J, hJ, h₁⟩, (inf_of_le_right _).symm⟩
state_before: case refine'_1
ι : Type u_1
I J J₁✝ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J
hJ : J ∈ π
J₁ : Box ι
h₁ : J₁ ∈ (πi J).boxes
⊢ J₁ ∈ (restrict (biUnion π πi) J).boxes

tactic: exact WithBot.coe_le_coe.2 (le_of_mem _ h₁)
state_before: case refine'_1
ι : Type u_1
I J J₁✝ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J
hJ : J ∈ π
J₁ : Box ι
h₁ : J₁ ∈ (πi J).boxes
⊢ ↑J₁ ≤ ↑J

tactic: simp only [iUnion_restrict, iUnion_biUnion, Set.subset_def, Set.mem_inter_iff, Set.mem_iUnion]
state_before: case refine'_2
ι : Type u_1
I J J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J
hJ : J ∈ π
⊢ Prepartition.iUnion (restrict (biUnion π πi) J) ⊆ Prepartition.iUnion (πi J)

tactic: rintro x ⟨hxJ, J₁, h₁, hx⟩
state_before: case refine'_2
ι : Type u_1
I J J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J
hJ : J ∈ π
⊢ ∀ (x : ι → ℝ), (x ∈ ↑J ∧ ∃ i i_1, x ∈ Prepartition.iUnion (πi i)) → x ∈ Prepartition.iUnion (πi J)

tactic: obtain rfl : J = J₁
state_before: case refine'_2.intro.intro.intro
ι : Type u_1
I J J₁✝ J₂ : Box ι
π π₁ π₂ : Prepartition I
x✝ : ι → ℝ
πi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J
hJ : J ∈ π
x : ι → ℝ
hxJ : x ∈ ↑J
J₁ : Box ι
h₁ : J₁ ∈ π
hx : x ∈ Prepartition.iUnion (πi J₁)
⊢ x ∈ Prepartition.iUnion (πi J)

tactic: exact π.eq_of_mem_of_mem hJ h₁ hxJ (iUnion_subset _ hx)
state_before: ι : Type u_1
I J J₁✝ J₂ : Box ι
π π₁ π₂ : Prepartition I
x✝ : ι → ℝ
πi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J
hJ : J ∈ π
x : ι → ℝ
hxJ : x ∈ ↑J
J₁ : Box ι
h₁ : J₁ ∈ π
hx : x ∈ Prepartition.iUnion (πi J₁)
⊢ J = J₁

case refine'_2.intro.intro.intro
ι : Type u_1
I J J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x✝ : ι → ℝ
πi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J
hJ : J ∈ π
x : ι → ℝ
hxJ : x ∈ ↑J
h₁ : J ∈ π
hx : x ∈ Prepartition.iUnion (πi J)
⊢ x ∈ Prepartition.iUnion (πi J)

tactic: exact hx
state_before: case refine'_2.intro.intro.intro
ι : Type u_1
I J J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x✝ : ι → ℝ
πi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J
hJ : J ∈ π
x : ι → ℝ
hxJ : x ∈ ↑J
h₁ : J ∈ π
hx : x ∈ Prepartition.iUnion (πi J)
⊢ x ∈ Prepartition.iUnion (πi J)
Theorem: Nat.mul_add_mod_of_lt
File: Mathlib/Data/Nat/Basic.lean

tactic: rw [Nat.mul_add_mod, Nat.mod_eq_of_lt h]
state_before: m n k a b c : ℕ
h : c < b
⊢ (a * b + c) % b = c
Theorem: Nat.filter_dvd_eq_divisors
File: Mathlib/NumberTheory/Divisors.lean

tactic: ext
state_before: n : ℕ
h : n ≠ 0
⊢ filter (fun x => x ∣ n) (range (succ n)) = divisors n

tactic: simp only [divisors, mem_filter, mem_range, mem_Ico, and_congr_left_iff, iff_and_self]
state_before: case a
n : ℕ
h : n ≠ 0
a✝ : ℕ
⊢ a✝ ∈ filter (fun x => x ∣ n) (range (succ n)) ↔ a✝ ∈ divisors n

tactic: exact fun ha _ => succ_le_iff.mpr (pos_of_dvd_of_pos ha h.bot_lt)
state_before: case a
n : ℕ
h : n ≠ 0
a✝ : ℕ
⊢ a✝ ∣ n → a✝ < succ n → 1 ≤ a✝
Theorem: Set.Ici_diff_left
File: Mathlib/Data/Set/Intervals/Basic.lean

tactic: simp [lt_iff_le_and_ne, eq_comm]
state_before: α : Type u_1
β : Type ?u.41632
inst✝ : PartialOrder α
a b c x : α
⊢ x ∈ Ici a \ {a} ↔ x ∈ Ioi a
Theorem: Matrix.updateColumn_transpose
File: Mathlib/Data/Matrix/Basic.lean

tactic: ext
state_before: l : Type ?u.1226495
m : Type u_1
n : Type u_2
o : Type ?u.1226504
m' : o → Type ?u.1226509
n' : o → Type ?u.1226514
R : Type ?u.1226517
S : Type ?u.1226520
α : Type v
β : Type w
γ : Type ?u.1226527
M : Matrix m n α
i : m
j : n
b : n → α
c : m → α
inst✝ : DecidableEq m
⊢ updateColumn Mᵀ i b = (updateRow M i b)ᵀ

tactic: rw [transpose_apply, updateRow_apply, updateColumn_apply]
state_before: case a.h
l : Type ?u.1226495
m : Type u_1
n : Type u_2
o : Type ?u.1226504
m' : o → Type ?u.1226509
n' : o → Type ?u.1226514
R : Type ?u.1226517
S : Type ?u.1226520
α : Type v
β : Type w
γ : Type ?u.1226527
M : Matrix m n α
i : m
j : n
b : n → α
c : m → α
inst✝ : DecidableEq m
i✝ : n
x✝ : m
⊢ updateColumn Mᵀ i b i✝ x✝ = (updateRow M i b)ᵀ i✝ x✝

tactic: rfl
state_before: case a.h
l : Type ?u.1226495
m : Type u_1
n : Type u_2
o : Type ?u.1226504
m' : o → Type ?u.1226509
n' : o → Type ?u.1226514
R : Type ?u.1226517
S : Type ?u.1226520
α : Type v
β : Type w
γ : Type ?u.1226527
M : Matrix m n α
i : m
j : n
b : n → α
c : m → α
inst✝ : DecidableEq m
i✝ : n
x✝ : m
⊢ (if x✝ = i then b i✝ else Mᵀ i✝ x✝) = if x✝ = i then b i✝ else M x✝ i✝
Theorem: nhdsWithin_inter'
File: Mathlib/Topology/ContinuousOn.lean

tactic: delta nhdsWithin
state_before: α : Type u_1
β : Type ?u.17802
γ : Type ?u.17805
δ : Type ?u.17808
inst✝ : TopologicalSpace α
a : α
s t : Set α
⊢ 𝓝[s ∩ t] a = 𝓝[s] a ⊓ 𝓟 t

tactic: rw [← inf_principal, inf_assoc]
state_before: α : Type u_1
β : Type ?u.17802
γ : Type ?u.17805
δ : Type ?u.17808
inst✝ : TopologicalSpace α
a : α
s t : Set α
⊢ 𝓝 a ⊓ 𝓟 (s ∩ t) = 𝓝 a ⊓ 𝓟 s ⊓ 𝓟 t
Theorem: MvPolynomial.eval₂Hom_comp_C
File: Mathlib/Data/MvPolynomial/Monad.lean

tactic: ext1 r
state_before: σ : Type u_3
τ : Type ?u.929356
R : Type u_1
S : Type u_2
T : Type ?u.929365
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : CommSemiring T
f✝ : σ → MvPolynomial τ R
f : R →+* S
g : σ → S
⊢ RingHom.comp (eval₂Hom f g) C = f

tactic: exact eval₂_C f g r
state_before: case a
σ : Type u_3
τ : Type ?u.929356
R : Type u_1
S : Type u_2
T : Type ?u.929365
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : CommSemiring T
f✝ : σ → MvPolynomial τ R
f : R →+* S
g : σ → S
r : R
⊢ ↑(RingHom.comp (eval₂Hom f g) C) r = ↑f r
Theorem: NonUnitalSubsemiring.coe_iSup_of_directed
File: Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean

tactic: simp [mem_iSup_of_directed hS]
state_before: R : Type u
S✝ : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S✝
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type ?u.280898
inst✝ : NonUnitalRingHomClass F R S✝
ι : Sort u_1
hι : Nonempty ι
S : ι → NonUnitalSubsemiring R
hS : Directed (fun x x_1 => x ≤ x_1) S
x : R
⊢ x ∈ ↑(⨆ (i : ι), S i) ↔ x ∈ ⋃ (i : ι), ↑(S i)
Theorem: Real.closedBall_eq_Icc
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: ext y
state_before: α : Type u
β : Type v
X : Type ?u.199537
ι : Type ?u.199540
inst✝ : PseudoMetricSpace α
x r : ℝ
⊢ closedBall x r = Icc (x - r) (x + r)

tactic: rw [mem_closedBall, dist_comm, Real.dist_eq, abs_sub_le_iff, mem_Icc, ← sub_le_iff_le_add',
  sub_le_comm]
state_before: case h
α : Type u
β : Type v
X : Type ?u.199537
ι : Type ?u.199540
inst✝ : PseudoMetricSpace α
x r y : ℝ
⊢ y ∈ closedBall x r ↔ y ∈ Icc (x - r) (x + r)
Theorem: zpow_left_injective
File: Mathlib/Algebra/GroupPower/Lemmas.lean

tactic: rcases hn.symm.lt_or_lt with (h | h)
state_before: α : Type u_1
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : LinearOrderedCommGroup α
n : ℤ
a b : α
hn : n ≠ 0
⊢ Function.Injective fun x => x ^ n

tactic: exact (zpow_strictMono_left α h).injective
state_before: case inl
α : Type u_1
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : LinearOrderedCommGroup α
n : ℤ
a b : α
hn : n ≠ 0
h : 0 < n
⊢ Function.Injective fun x => x ^ n

tactic: refine' fun a b (hab : a ^ n = b ^ n) => (zpow_strictMono_left α (neg_pos.mpr h)).injective _
state_before: case inr
α : Type u_1
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : LinearOrderedCommGroup α
n : ℤ
a b : α
hn : n ≠ 0
h : n < 0
⊢ Function.Injective fun x => x ^ n

tactic: rw [zpow_neg, zpow_neg, hab]
state_before: case inr
α : Type u_1
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : LinearOrderedCommGroup α
n : ℤ
a✝ b✝ : α
hn : n ≠ 0
h : n < 0
a b : α
hab : a ^ n = b ^ n
⊢ a ^ (-n) = b ^ (-n)
Theorem: FreeAbelianGroup.support_of
File: Mathlib/GroupTheory/FreeAbelianGroupFinsupp.lean

tactic: rw [support, toFinsupp_of, Finsupp.support_single_ne_zero _ one_ne_zero]
state_before: X : Type u_1
x : X
⊢ support (of x) = {x}
Theorem: Ordinal.principal_opow_omega
File: Mathlib/SetTheory/Ordinal/Principal.lean

tactic: simp_rw [← nat_cast_opow]
state_before: a b : Ordinal
m n : ℕ
ha : ↑m < ω
hb : ↑n < ω
⊢ (fun x x_1 => x ^ x_1) ↑m ↑n < ω

tactic: apply nat_lt_omega
state_before: a b : Ordinal
m n : ℕ
ha : ↑m < ω
hb : ↑n < ω
⊢ ↑(m ^ n) < ω
Theorem: CategoryTheory.Subobject.le_mk_of_comm
File: Mathlib/CategoryTheory/Subobject/Basic.lean

tactic: simp [w]
state_before: C : Type u₁
inst✝² : Category C
X✝ Y Z : C
D : Type u₂
inst✝¹ : Category D
B A : C
X : Subobject B
f : A ⟶ B
inst✝ : Mono f
g : underlying.obj X ⟶ A
w : g ≫ f = arrow X
⊢ (g ≫ (underlyingIso f).inv) ≫ arrow (mk f) = arrow X
Theorem: Finset.biUnion_nonempty
File: Mathlib/Data/Finset/Basic.lean

tactic: simp only [Finset.Nonempty, mem_biUnion]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.529716
inst✝ : DecidableEq β
s s₁ s₂ : Finset α
t t₁ t₂ : α → Finset β
⊢ Finset.Nonempty (Finset.biUnion s t) ↔ ∃ x, x ∈ s ∧ Finset.Nonempty (t x)

tactic: rw [exists_swap]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.529716
inst✝ : DecidableEq β
s s₁ s₂ : Finset α
t t₁ t₂ : α → Finset β
⊢ (∃ x a, a ∈ s ∧ x ∈ t a) ↔ ∃ x, x ∈ s ∧ ∃ x_1, x_1 ∈ t x

tactic: simp [exists_and_left]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.529716
inst✝ : DecidableEq β
s s₁ s₂ : Finset α
t t₁ t₂ : α → Finset β
⊢ (∃ y x, y ∈ s ∧ x ∈ t y) ↔ ∃ x, x ∈ s ∧ ∃ x_1, x_1 ∈ t x
Theorem: CategoryTheory.Functor.isMittagLeffler_of_surjective
File: Mathlib/CategoryTheory/CofilteredSystem.lean

tactic: rw [map_id, types_id, range_id, (h g).range_eq]
state_before: J : Type u
inst✝ : Category J
F : J ⥤ Type v
i j✝ k✝ : J
s : Set (F.obj i)
h : ∀ ⦃i j : J⦄ (f : i ⟶ j), Function.Surjective (F.map f)
j k : J
g : k ⟶ j
⊢ range (F.map (𝟙 j)) ⊆ range (F.map g)
Theorem: Nat.binomial_succ_succ
File: Mathlib/Data/Nat/Choose/Multinomial.lean

tactic: simp only [binomial_eq_choose, Function.update_apply,
  h, Ne.def, ite_true, ite_false]
state_before: α : Type u_1
s : Finset α
f : α → ℕ
a b : α
n : ℕ
inst✝ : DecidableEq α
h : a ≠ b
⊢ multinomial {a, b} (Function.update (Function.update f a (succ (f a))) b (succ (f b))) =
    multinomial {a, b} (Function.update f a (succ (f a))) + multinomial {a, b} (Function.update f b (succ (f b)))

tactic: rw [if_neg h.symm]
state_before: α : Type u_1
s : Finset α
f : α → ℕ
a b : α
n : ℕ
inst✝ : DecidableEq α
h : a ≠ b
⊢ choose (succ (f a) + succ (f b)) (succ (f a)) =
    choose (succ (f a) + if b = a then succ (f a) else f b) (succ (f a)) + choose (f a + succ (f b)) (f a)

tactic: rw [add_succ, choose_succ_succ, succ_add_eq_succ_add]
state_before: α : Type u_1
s : Finset α
f : α → ℕ
a b : α
n : ℕ
inst✝ : DecidableEq α
h : a ≠ b
⊢ choose (succ (f a) + succ (f b)) (succ (f a)) =
    choose (succ (f a) + f b) (succ (f a)) + choose (f a + succ (f b)) (f a)

tactic: simp only
state_before: α : Type u_1
s : Finset α
f : α → ℕ
a b : α
n : ℕ
inst✝ : DecidableEq α
h : a ≠ b
⊢ choose (f a + succ (f b)) (f a) + choose (f a + succ (f b)) (succ (f a)) =
    choose (f a + succ (f b)) (succ (f a)) + choose (f a + succ (f b)) (f a)

tactic: ring
state_before: α : Type u_1
s : Finset α
f : α → ℕ
a b : α
n : ℕ
inst✝ : DecidableEq α
h : a ≠ b
⊢ choose (f a + succ (f b)) (f a) + choose (f a + succ (f b)) (succ (f a)) =
    choose (f a + succ (f b)) (succ (f a)) + choose (f a + succ (f b)) (f a)
Theorem: GeneralizedContinuedFraction.continuantsAux_stable_step_of_terminated
File: Mathlib/Algebra/ContinuedFractions/TerminatedStable.lean

tactic: rw [terminatedAt_iff_s_none] at terminated_at_n
state_before: K : Type u_1
g : GeneralizedContinuedFraction K
n m : ℕ
inst✝ : DivisionRing K
terminated_at_n : TerminatedAt g n
⊢ continuantsAux g (n + 2) = continuantsAux g (n + 1)

tactic: simp only [continuantsAux, Nat.add_eq, add_zero, terminated_at_n]
state_before: K : Type u_1
g : GeneralizedContinuedFraction K
n m : ℕ
inst✝ : DivisionRing K
terminated_at_n : Stream'.Seq.get? g.s n = none
⊢ continuantsAux g (n + 2) = continuantsAux g (n + 1)
Theorem: Bool.not_eq_false
File: src/lean/Init/SimpLemmas.lean

tactic: cases b <;> decide
state_before: b : Bool
⊢ (¬b = false) = (b = true)
Theorem: max_zero_add_max_neg_zero_eq_abs_self
File: Mathlib/Algebra/Order/Ring/Abs.lean

tactic: symm
state_before: α : Type u_1
inst✝ : LinearOrderedRing α
a✝ b c a : α
⊢ max a 0 + max (-a) 0 = abs a

tactic: rcases le_total 0 a with (ha | ha) <;> simp [ha]
state_before: α : Type u_1
inst✝ : LinearOrderedRing α
a✝ b c a : α
⊢ abs a = max a 0 + max (-a) 0
Theorem: Polynomial.eval₂_eq_sum_range
File: Mathlib/Data/Polynomial/Eval.lean

tactic: simp
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
x : S
⊢ (fun i => eval₂ f x (↑(monomial i) (coeff p i))) = fun i => ↑f (coeff p i) * x ^ i
Theorem: Int.add_ediv_of_dvd_right
File: Std/Data/Int/DivMod.lean

tactic: simp [h]
state_before: a b c : Int
H : c ∣ b
h : c = 0
⊢ (a + b) / c = a / c + b / c

tactic: let ⟨k, hk⟩ := H
state_before: a b c : Int
H : c ∣ b
h : ¬c = 0
⊢ (a + b) / c = a / c + b / c

tactic: rw [hk, Int.mul_comm c k, Int.add_mul_ediv_right _ _ h,
  ← Int.zero_add (k * c), Int.add_mul_ediv_right _ _ h, Int.zero_ediv, Int.zero_add]
state_before: a b c : Int
H : c ∣ b
h : ¬c = 0
k : Int
hk : b = c * k
⊢ (a + b) / c = a / c + b / c
Theorem: CategoryTheory.exact_kernelSubobject_arrow
File: Mathlib/Algebra/Homology/Exact.lean

tactic: refine' ⟨by simp, _⟩
state_before: V : Type u
inst✝³ : Category V
inst✝² : HasImages V
A B C D : V
f : A ⟶ B
g : B ⟶ C
h : C ⟶ D
inst✝¹ : HasZeroMorphisms V
inst✝ : HasEqualizers V
⊢ Exact (Subobject.arrow (kernelSubobject f)) f

tactic: refine' @IsIso.epi_of_iso _ _ _ _ _ ?_
state_before: V : Type u
inst✝³ : Category V
inst✝² : HasImages V
A B C D : V
f : A ⟶ B
g : B ⟶ C
h : C ⟶ D
inst✝¹ : HasZeroMorphisms V
inst✝ : HasEqualizers V
⊢ Epi (imageToKernel (Subobject.arrow (kernelSubobject f)) f (_ : Subobject.arrow (kernelSubobject f) ≫ f = 0))

tactic: exact ⟨⟨factorThruImageSubobject _, by aesop_cat, by aesop_cat⟩⟩
state_before: V : Type u
inst✝³ : Category V
inst✝² : HasImages V
A B C D : V
f : A ⟶ B
g : B ⟶ C
h : C ⟶ D
inst✝¹ : HasZeroMorphisms V
inst✝ : HasEqualizers V
⊢ IsIso (imageToKernel (Subobject.arrow (kernelSubobject f)) f (_ : Subobject.arrow (kernelSubobject f) ≫ f = 0))

tactic: simp
state_before: V : Type u
inst✝³ : Category V
inst✝² : HasImages V
A B C D : V
f : A ⟶ B
g : B ⟶ C
h : C ⟶ D
inst✝¹ : HasZeroMorphisms V
inst✝ : HasEqualizers V
⊢ Subobject.arrow (kernelSubobject f) ≫ f = 0

tactic: aesop_cat
state_before: V : Type u
inst✝³ : Category V
inst✝² : HasImages V
A B C D : V
f : A ⟶ B
g : B ⟶ C
h : C ⟶ D
inst✝¹ : HasZeroMorphisms V
inst✝ : HasEqualizers V
⊢ imageToKernel (Subobject.arrow (kernelSubobject f)) f (_ : Subobject.arrow (kernelSubobject f) ≫ f = 0) ≫
      factorThruImageSubobject (Subobject.arrow (kernelSubobject f)) =
    𝟙 (Subobject.underlying.obj (imageSubobject (Subobject.arrow (kernelSubobject f))))

tactic: aesop_cat
state_before: V : Type u
inst✝³ : Category V
inst✝² : HasImages V
A B C D : V
f : A ⟶ B
g : B ⟶ C
h : C ⟶ D
inst✝¹ : HasZeroMorphisms V
inst✝ : HasEqualizers V
⊢ factorThruImageSubobject (Subobject.arrow (kernelSubobject f)) ≫
      imageToKernel (Subobject.arrow (kernelSubobject f)) f (_ : Subobject.arrow (kernelSubobject f) ≫ f = 0) =
    𝟙 (Subobject.underlying.obj (kernelSubobject f))
Theorem: mulPosReflectLT_iff_contravariant_pos
File: Mathlib/Algebra/Order/Ring/Lemmas.lean

tactic: obtain ha | ha := a.prop.eq_or_lt
state_before: α : Type u_1
a✝ b✝ c✝ d : α
inst✝¹ : MulZeroClass α
inst✝ : PartialOrder α
h✝ : ContravariantClass { x // 0 < x } α (fun x y => y * ↑x) fun x x_1 => x < x_1
a : { x // 0 ≤ x }
b c : α
h : b * ↑a < c * ↑a
⊢ b < c

tactic: simp [←ha] at h
state_before: case inl
α : Type u_1
a✝ b✝ c✝ d : α
inst✝¹ : MulZeroClass α
inst✝ : PartialOrder α
h✝ : ContravariantClass { x // 0 < x } α (fun x y => y * ↑x) fun x x_1 => x < x_1
a : { x // 0 ≤ x }
b c : α
h : b * ↑a < c * ↑a
ha : 0 = ↑a
⊢ b < c
Theorem: String.Iterator.Valid.next
File: Std/Data/String/Lemmas.lean

tactic: let ⟨l, r, h⟩ := h.validFor
state_before: x✝ : Iterator
h : Valid x✝
hn : hasNext x✝ = true
⊢ Valid (Iterator.next x✝)

tactic: obtain ⟨c, r, rfl⟩ := List.exists_cons_of_ne_nil (h.hasNext.1 hn)
state_before: x✝ : Iterator
h✝ : Valid x✝
hn : hasNext x✝ = true
l r : List Char
h : ValidFor l r x✝
⊢ Valid (Iterator.next x✝)

tactic: exact h.next.valid
state_before: case intro.intro
x✝ : Iterator
h✝ : Valid x✝
hn : hasNext x✝ = true
l : List Char
c : Char
r : List Char
h : ValidFor l (c :: r) x✝
⊢ Valid (Iterator.next x✝)
Theorem: Dfinsupp.toFinsupp_support
File: Mathlib/Data/Finsupp/ToDfinsupp.lean

tactic: ext
state_before: ι : Type u_1
R : Type ?u.6059
M : Type u_2
inst✝² : DecidableEq ι
inst✝¹ : Zero M
inst✝ : (m : M) → Decidable (m ≠ 0)
f : Π₀ (x : ι), M
⊢ (toFinsupp f).support = support f

tactic: simp
state_before: case a
ι : Type u_1
R : Type ?u.6059
M : Type u_2
inst✝² : DecidableEq ι
inst✝¹ : Zero M
inst✝ : (m : M) → Decidable (m ≠ 0)
f : Π₀ (x : ι), M
a✝ : ι
⊢ a✝ ∈ (toFinsupp f).support ↔ a✝ ∈ support f
Theorem: rat_add_continuous_lemma
File: Mathlib/Data/Real/CauSeq.lean

tactic: simpa [add_halves, sub_eq_add_neg, add_comm, add_left_comm, add_assoc] using
  lt_of_le_of_lt (abv_add abv _ _) (add_lt_add h₁ h₂)
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
ε : α
ε0 : 0 < ε
a₁ a₂ b₁ b₂ : β
h₁ : abv (a₁ - b₁) < ε / 2
h₂ : abv (a₂ - b₂) < ε / 2
⊢ abv (a₁ + a₂ - (b₁ + b₂)) < ε
Theorem: List.prod_map_erase
File: Mathlib/Data/List/BigOperators/Basic.lean

tactic: obtain rfl | ⟨ne, h⟩ := Decidable.List.eq_or_ne_mem_of_mem h
state_before: ι : Type u_1
α : Type ?u.154080
M : Type u_2
N : Type ?u.154086
P : Type ?u.154089
M₀ : Type ?u.154092
G : Type ?u.154095
R : Type ?u.154098
inst✝¹ : DecidableEq ι
inst✝ : CommMonoid M
f : ι → M
a b : ι
l : List ι
h : a ∈ b :: l
⊢ f a * prod (map f (List.erase (b :: l) a)) = prod (map f (b :: l))

tactic: simp only [map, erase_cons_head, prod_cons]
state_before: case inl
ι : Type u_1
α : Type ?u.154080
M : Type u_2
N : Type ?u.154086
P : Type ?u.154089
M₀ : Type ?u.154092
G : Type ?u.154095
R : Type ?u.154098
inst✝¹ : DecidableEq ι
inst✝ : CommMonoid M
f : ι → M
a : ι
l : List ι
h : a ∈ a :: l
⊢ f a * prod (map f (List.erase (a :: l) a)) = prod (map f (a :: l))

tactic: simp only [map, erase_cons_tail _ ne.symm, prod_cons, prod_map_erase _ h,
  mul_left_comm (f a) (f b)]
state_before: case inr.intro
ι : Type u_1
α : Type ?u.154080
M : Type u_2
N : Type ?u.154086
P : Type ?u.154089
M₀ : Type ?u.154092
G : Type ?u.154095
R : Type ?u.154098
inst✝¹ : DecidableEq ι
inst✝ : CommMonoid M
f : ι → M
a b : ι
l : List ι
h✝ : a ∈ b :: l
ne : a ≠ b
h : a ∈ l
⊢ f a * prod (map f (List.erase (b :: l) a)) = prod (map f (b :: l))
Theorem: Multiset.antidiagonal_eq_map_powerset
File: Mathlib/Data/Multiset/Antidiagonal.lean

tactic: induction' s using Multiset.induction_on with a s hs
state_before: α : Type u_1
β : Type ?u.21052
inst✝ : DecidableEq α
s : Multiset α
⊢ antidiagonal s = map (fun t => (s - t, t)) (powerset s)

tactic: simp only [antidiagonal_zero, powerset_zero, zero_tsub, map_singleton]
state_before: case empty
α : Type u_1
β : Type ?u.21052
inst✝ : DecidableEq α
⊢ antidiagonal 0 = map (fun t => (0 - t, t)) (powerset 0)

tactic: simp_rw [antidiagonal_cons, powerset_cons, map_add, hs, map_map, Function.comp, Prod.map_mk,
  id.def, sub_cons, erase_cons_head]
state_before: case cons
α : Type u_1
β : Type ?u.21052
inst✝ : DecidableEq α
a : α
s : Multiset α
hs : antidiagonal s = map (fun t => (s - t, t)) (powerset s)
⊢ antidiagonal (a ::ₘ s) = map (fun t => (a ::ₘ s - t, t)) (powerset (a ::ₘ s))

tactic: rw [add_comm]
state_before: case cons
α : Type u_1
β : Type ?u.21052
inst✝ : DecidableEq α
a : α
s : Multiset α
hs : antidiagonal s = map (fun t => (s - t, t)) (powerset s)
⊢ map (fun x => (s - x, a ::ₘ x)) (powerset s) + map (fun x => (a ::ₘ (s - x), x)) (powerset s) =
    map (fun x => (a ::ₘ s - x, x)) (powerset s) + map (fun x => (s - x, a ::ₘ x)) (powerset s)

tactic: congr 1
state_before: case cons
α : Type u_1
β : Type ?u.21052
inst✝ : DecidableEq α
a : α
s : Multiset α
hs : antidiagonal s = map (fun t => (s - t, t)) (powerset s)
⊢ map (fun x => (a ::ₘ (s - x), x)) (powerset s) + map (fun x => (s - x, a ::ₘ x)) (powerset s) =
    map (fun x => (a ::ₘ s - x, x)) (powerset s) + map (fun x => (s - x, a ::ₘ x)) (powerset s)

tactic: refine' Multiset.map_congr rfl fun x hx ↦ _
state_before: case cons.e_a
α : Type u_1
β : Type ?u.21052
inst✝ : DecidableEq α
a : α
s : Multiset α
hs : antidiagonal s = map (fun t => (s - t, t)) (powerset s)
⊢ map (fun x => (a ::ₘ (s - x), x)) (powerset s) = map (fun x => (a ::ₘ s - x, x)) (powerset s)

tactic: rw [cons_sub_of_le _ (mem_powerset.mp hx)]
state_before: case cons.e_a
α : Type u_1
β : Type ?u.21052
inst✝ : DecidableEq α
a : α
s : Multiset α
hs : antidiagonal s = map (fun t => (s - t, t)) (powerset s)
x : Multiset α
hx : x ∈ powerset s
⊢ (a ::ₘ (s - x), x) = (a ::ₘ s - x, x)
Theorem: Polynomial.degree_sub_eq_left_of_degree_lt
File: Mathlib/Data/Polynomial/Degree/Definitions.lean

tactic: rw [← degree_neg q] at h
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Ring R
p q : R[X]
h : degree q < degree p
⊢ degree (p - q) = degree p

tactic: rw [sub_eq_add_neg, degree_add_eq_left_of_degree_lt h]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Ring R
p q : R[X]
h : degree (-q) < degree p
⊢ degree (p - q) = degree p
Theorem: T0Space.of_cover
File: Mathlib/Topology/Separation.lean

tactic: refine' ⟨fun x y hxy => _⟩
state_before: α : Type u
β : Type v
inst✝ : TopologicalSpace α
h : ∀ (x y : α), Inseparable x y → ∃ s, x ∈ s ∧ y ∈ s ∧ T0Space ↑s
⊢ T0Space α

tactic: rcases h x y hxy with ⟨s, hxs, hys, hs⟩
state_before: α : Type u
β : Type v
inst✝ : TopologicalSpace α
h : ∀ (x y : α), Inseparable x y → ∃ s, x ∈ s ∧ y ∈ s ∧ T0Space ↑s
x y : α
hxy : Inseparable x y
⊢ x = y

tactic: lift x to s using hxs
state_before: case intro.intro.intro
α : Type u
β : Type v
inst✝ : TopologicalSpace α
h : ∀ (x y : α), Inseparable x y → ∃ s, x ∈ s ∧ y ∈ s ∧ T0Space ↑s
x y : α
hxy : Inseparable x y
s : Set α
hxs : x ∈ s
hys : y ∈ s
hs : T0Space ↑s
⊢ x = y

tactic: lift y to s using hys
state_before: case intro.intro.intro.intro
α : Type u
β : Type v
inst✝ : TopologicalSpace α
h : ∀ (x y : α), Inseparable x y → ∃ s, x ∈ s ∧ y ∈ s ∧ T0Space ↑s
y : α
s : Set α
hys : y ∈ s
hs : T0Space ↑s
x : { x // x ∈ s }
hxy : Inseparable (↑x) y
⊢ ↑x = y

tactic: rw [← subtype_inseparable_iff] at hxy
state_before: case intro.intro.intro.intro.intro
α : Type u
β : Type v
inst✝ : TopologicalSpace α
h : ∀ (x y : α), Inseparable x y → ∃ s, x ∈ s ∧ y ∈ s ∧ T0Space ↑s
s : Set α
hs : T0Space ↑s
x y : { x // x ∈ s }
hxy : Inseparable ↑x ↑y
⊢ ↑x = ↑y

tactic: exact congr_arg Subtype.val hxy.eq
state_before: case intro.intro.intro.intro.intro
α : Type u
β : Type v
inst✝ : TopologicalSpace α
h : ∀ (x y : α), Inseparable x y → ∃ s, x ∈ s ∧ y ∈ s ∧ T0Space ↑s
s : Set α
hs : T0Space ↑s
x y : { x // x ∈ s }
hxy : Inseparable x y
⊢ ↑x = ↑y
Theorem: Complex.log_neg_one
File: Mathlib/Analysis/SpecialFunctions/Complex/Log.lean

tactic: simp [log]
state_before: ⊢ log (-1) = ↑π * I