tasksource/leandojo huggingface dataset:
Theorem: lcm_eq_zero_iff
File: Mathlib/Algebra/GCDMonoid/Basic.lean

tactic: have : Associated (a * b) 0 := (gcd_mul_lcm a b).symm.trans <| by rw [h, mul_zero]
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
a b : α
h : lcm a b = 0
⊢ a = 0 ∨ b = 0

tactic: rwa [← mul_eq_zero, ← associated_zero_iff_eq_zero]
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
a b : α
h : lcm a b = 0
this : Associated (a * b) 0
⊢ a = 0 ∨ b = 0

tactic: rw [h, mul_zero]
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
a b : α
h : lcm a b = 0
⊢ Associated (gcd a b * lcm a b) 0

tactic: rintro (rfl | rfl) <;> [apply lcm_zero_left; apply lcm_zero_right]
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
a b : α
⊢ a = 0 ∨ b = 0 → lcm a b = 0
Theorem: MeasureTheory.measure_toMeasurable
File: Mathlib/MeasureTheory/Measure/MeasureSpaceDef.lean

tactic: rw [toMeasurable_def]
state_before: α : Type u_1
β : Type ?u.144519
γ : Type ?u.144522
δ : Type ?u.144525
ι : Type ?u.144528
inst✝ : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t s : Set α
⊢ ↑↑μ (toMeasurable μ s) = ↑↑μ s

tactic: split_ifs with hs h's
state_before: α : Type u_1
β : Type ?u.144519
γ : Type ?u.144522
δ : Type ?u.144525
ι : Type ?u.144528
inst✝ : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t s : Set α
⊢ ↑↑μ
      (if h : ∃ t x, MeasurableSet t ∧ t =ᵐ[μ] s then Exists.choose h
      else
        if h' : ∃ t x, MeasurableSet t ∧ ∀ (u : Set α), MeasurableSet u → ↑↑μ (t ∩ u) = ↑↑μ (s ∩ u) then
          Exists.choose h'
        else Exists.choose (_ : ∃ t, s ⊆ t ∧ MeasurableSet t ∧ ↑↑μ t = ↑↑μ s)) =
    ↑↑μ s

tactic: exact measure_congr hs.choose_spec.snd.2
state_before: case inl
α : Type u_1
β : Type ?u.144519
γ : Type ?u.144522
δ : Type ?u.144525
ι : Type ?u.144528
inst✝ : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t s : Set α
hs : ∃ t x, MeasurableSet t ∧ t =ᵐ[μ] s
⊢ ↑↑μ (Exists.choose hs) = ↑↑μ s

tactic: simpa only [inter_univ] using h's.choose_spec.snd.2 univ MeasurableSet.univ
state_before: case inr.inl
α : Type u_1
β : Type ?u.144519
γ : Type ?u.144522
δ : Type ?u.144525
ι : Type ?u.144528
inst✝ : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t s : Set α
hs : ¬∃ t x, MeasurableSet t ∧ t =ᵐ[μ] s
h's : ∃ t x, MeasurableSet t ∧ ∀ (u : Set α), MeasurableSet u → ↑↑μ (t ∩ u) = ↑↑μ (s ∩ u)
⊢ ↑↑μ (Exists.choose h's) = ↑↑μ s

tactic: exact (exists_measurable_superset μ s).choose_spec.2.2
state_before: case inr.inr
α : Type u_1
β : Type ?u.144519
γ : Type ?u.144522
δ : Type ?u.144525
ι : Type ?u.144528
inst✝ : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t s : Set α
hs : ¬∃ t x, MeasurableSet t ∧ t =ᵐ[μ] s
h's : ¬∃ t x, MeasurableSet t ∧ ∀ (u : Set α), MeasurableSet u → ↑↑μ (t ∩ u) = ↑↑μ (s ∩ u)
⊢ ↑↑μ (Exists.choose (_ : ∃ t, s ⊆ t ∧ MeasurableSet t ∧ ↑↑μ t = ↑↑μ s)) = ↑↑μ s
Theorem: Pi.update_eq_div_mul_mulSingle
File: Mathlib/Algebra/Group/Pi.lean

tactic: ext j
state_before: ι : Type ?u.76203
α : Type ?u.76206
I : Type u
f : I → Type v
x✝ y : (i : I) → f i
i j : I
inst✝¹ : DecidableEq I
inst✝ : (i : I) → Group (f i)
g : (i : I) → f i
x : f i
⊢ Function.update g i x = g / mulSingle i (g i) * mulSingle i x

tactic: rcases eq_or_ne i j with (rfl | h)
state_before: case h
ι : Type ?u.76203
α : Type ?u.76206
I : Type u
f : I → Type v
x✝ y : (i : I) → f i
i j✝ : I
inst✝¹ : DecidableEq I
inst✝ : (i : I) → Group (f i)
g : (i : I) → f i
x : f i
j : I
⊢ Function.update g i x j = (g / mulSingle i (g i) * mulSingle i x) j

tactic: simp
state_before: case h.inl
ι : Type ?u.76203
α : Type ?u.76206
I : Type u
f : I → Type v
x✝ y : (i : I) → f i
i j : I
inst✝¹ : DecidableEq I
inst✝ : (i : I) → Group (f i)
g : (i : I) → f i
x : f i
⊢ Function.update g i x i = (g / mulSingle i (g i) * mulSingle i x) i

tactic: simp [Function.update_noteq h.symm, h]
state_before: case h.inr
ι : Type ?u.76203
α : Type ?u.76206
I : Type u
f : I → Type v
x✝ y : (i : I) → f i
i j✝ : I
inst✝¹ : DecidableEq I
inst✝ : (i : I) → Group (f i)
g : (i : I) → f i
x : f i
j : I
h : i ≠ j
⊢ Function.update g i x j = (g / mulSingle i (g i) * mulSingle i x) j
Theorem: Finset.iSup_finset_image
File: Mathlib/Data/Finset/Lattice.lean

tactic: rw [← iSup_coe, coe_image, iSup_image, iSup_coe]
state_before: F : Type ?u.450915
α : Type u_3
β : Type u_2
γ : Type u_1
ι : Type ?u.450927
κ : Type ?u.450930
inst✝¹ : CompleteLattice β
inst✝ : DecidableEq α
f : γ → α
g : α → β
s : Finset γ
⊢ (⨆ (x : α) (_ : x ∈ image f s), g x) = ⨆ (y : γ) (_ : y ∈ s), g (f y)
Theorem: RingHom.ker_coe_equiv
File: Mathlib/RingTheory/Ideal/Operations.lean

tactic: simpa only [← injective_iff_ker_eq_bot] using EquivLike.injective f
state_before: R : Type u
S : Type v
T : Type w
F : Type ?u.1772041
inst✝¹ : Ring R
inst✝ : Semiring S
rc : RingHomClass F R S
f✝ : F
f : R ≃+* S
⊢ ker ↑f = ⊥
Theorem: Set.Nonempty.mul_zero
File: Mathlib/Data/Set/Pointwise/Basic.lean

tactic: simpa [mem_mul] using hs
state_before: F : Type ?u.106599
α : Type u_1
β : Type ?u.106605
γ : Type ?u.106608
inst✝ : MulZeroClass α
s t : Set α
hs : Set.Nonempty s
⊢ 0 ⊆ s * 0
Theorem: Set.nontrivial_of_infsep_pos
File: Mathlib/Topology/MetricSpace/Infsep.lean

tactic: contrapose hs
state_before: α : Type u_1
β : Type ?u.55856
inst✝ : EDist α
x y : α
s : Set α
hs : 0 < infsep s
⊢ Set.Nontrivial s

tactic: rw [not_nontrivial_iff] at hs
state_before: α : Type u_1
β : Type ?u.55856
inst✝ : EDist α
x y : α
s : Set α
hs : ¬Set.Nontrivial s
⊢ ¬0 < infsep s

tactic: exact hs.infsep_zero ▸ lt_irrefl _
state_before: α : Type u_1
β : Type ?u.55856
inst✝ : EDist α
x y : α
s : Set α
hs : Set.Subsingleton s
⊢ ¬0 < infsep s
Theorem: Set.preimage_const_mul_Icc_of_neg
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simpa only [mul_comm] using preimage_mul_const_Icc_of_neg a b h
state_before: α : Type u_1
inst✝ : LinearOrderedField α
a✝ a b c : α
h : c < 0
⊢ (fun x x_1 => x * x_1) c ⁻¹' Icc a b = Icc (b / c) (a / c)
Theorem: PEquiv.trans_single_of_eq_none
File: Mathlib/Data/PEquiv.lean

tactic: ext
state_before: α : Type u
β : Type v
γ : Type w
δ : Type x
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : DecidableEq γ
b : β
c : γ
f : δ ≃. β
h : ↑(PEquiv.symm f) b = none
⊢ PEquiv.trans f (single b c) = ⊥

tactic: simp only [eq_none_iff_forall_not_mem, Option.mem_def, f.eq_some_iff] at h
state_before: case h.a
α : Type u
β : Type v
γ : Type w
δ : Type x
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : DecidableEq γ
b : β
c : γ
f : δ ≃. β
h : ↑(PEquiv.symm f) b = none
x✝ : δ
a✝ : γ
⊢ a✝ ∈ ↑(PEquiv.trans f (single b c)) x✝ ↔ a✝ ∈ ↑⊥ x✝

tactic: dsimp [PEquiv.trans, single]
state_before: case h.a
α : Type u
β : Type v
γ : Type w
δ : Type x
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : DecidableEq γ
b : β
c : γ
f : δ ≃. β
x✝ : δ
a✝ : γ
h : ∀ (a : δ), ¬↑f a = some b
⊢ a✝ ∈ ↑(PEquiv.trans f (single b c)) x✝ ↔ a✝ ∈ ↑⊥ x✝

tactic: simp
state_before: case h.a
α : Type u
β : Type v
γ : Type w
δ : Type x
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : DecidableEq γ
b : β
c : γ
f : δ ≃. β
x✝ : δ
a✝ : γ
h : ∀ (a : δ), ¬↑f a = some b
⊢ (a✝ ∈ Option.bind (↑f x✝) fun x => if x = b then some c else none) ↔ a✝ ∈ none

tactic: intros
state_before: case h.a
α : Type u
β : Type v
γ : Type w
δ : Type x
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : DecidableEq γ
b : β
c : γ
f : δ ≃. β
x✝ : δ
a✝ : γ
h : ∀ (a : δ), ¬↑f a = some b
⊢ ∀ (x : β), ↑f x✝ = some x → ¬(if x = b then some c else none) = some a✝

tactic: split_ifs <;> simp_all
state_before: case h.a
α : Type u
β : Type v
γ : Type w
δ : Type x
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : DecidableEq γ
b : β
c : γ
f : δ ≃. β
x✝¹ : δ
a✝¹ : γ
h : ∀ (a : δ), ¬↑f a = some b
x✝ : β
a✝ : ↑f x✝¹ = some x✝
⊢ ¬(if x✝ = b then some c else none) = some a✝¹
Theorem: List.takeDTR_go_eq
File: Std/Data/List/Basic.lean

tactic: simp [takeDTR.go]
state_before: α✝ : Type u_1
dflt : α✝
acc : Array α✝
x✝ : List α✝
⊢ takeDTR.go dflt 0 x✝ acc = acc.data ++ takeD 0 x✝ dflt

tactic: simp [takeDTR.go]
state_before: α✝ : Type u_1
dflt : α✝
acc : Array α✝
n✝ : Nat
⊢ takeDTR.go dflt (n✝ + 1) [] acc = acc.data ++ takeD (n✝ + 1) [] dflt

tactic: simp [takeDTR.go, takeDTR_go_eq _ l]
state_before: α✝ : Type u_1
dflt : α✝
acc : Array α✝
n✝ : Nat
head✝ : α✝
l : List α✝
⊢ takeDTR.go dflt (n✝ + 1) (head✝ :: l) acc = acc.data ++ takeD (n✝ + 1) (head✝ :: l) dflt
Theorem: Composition.single_blocksFun
File: Mathlib/Combinatorics/Composition.lean

tactic: simp [blocksFun, single, blocks, i.2]
state_before: n✝ : ℕ
c : Composition n✝
n : ℕ
h : 0 < n
i : Fin (length (single n h))
⊢ blocksFun (single n h) i = n
Theorem: Ideal.leadingCoeffNth_mono
File: Mathlib/RingTheory/Polynomial/Basic.lean

tactic: intro r hr
state_before: R : Type u
S : Type ?u.180424
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
m n : ℕ
H : m ≤ n
⊢ leadingCoeffNth I m ≤ leadingCoeffNth I n

tactic: simp only [SetLike.mem_coe, mem_leadingCoeffNth] at hr⊢
state_before: R : Type u
S : Type ?u.180424
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
m n : ℕ
H : m ≤ n
r : R
hr : r ∈ leadingCoeffNth I m
⊢ r ∈ leadingCoeffNth I n

tactic: rcases hr with ⟨p, hpI, hpdeg, rfl⟩
state_before: R : Type u
S : Type ?u.180424
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
m n : ℕ
H : m ≤ n
r : R
hr : ∃ p, p ∈ I ∧ degree p ≤ ↑m ∧ Polynomial.leadingCoeff p = r
⊢ ∃ p, p ∈ I ∧ degree p ≤ ↑n ∧ Polynomial.leadingCoeff p = r

tactic: refine' ⟨p * X ^ (n - m), I.mul_mem_right _ hpI, _, leadingCoeff_mul_X_pow⟩
state_before: case intro.intro.intro
R : Type u
S : Type ?u.180424
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
m n : ℕ
H : m ≤ n
p : R[X]
hpI : p ∈ I
hpdeg : degree p ≤ ↑m
⊢ ∃ p_1, p_1 ∈ I ∧ degree p_1 ≤ ↑n ∧ Polynomial.leadingCoeff p_1 = Polynomial.leadingCoeff p

tactic: refine' le_trans (degree_mul_le _ _) _
state_before: case intro.intro.intro
R : Type u
S : Type ?u.180424
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
m n : ℕ
H : m ≤ n
p : R[X]
hpI : p ∈ I
hpdeg : degree p ≤ ↑m
⊢ degree (p * X ^ (n - m)) ≤ ↑n

tactic: refine' le_trans (add_le_add hpdeg (degree_X_pow_le _)) _
state_before: case intro.intro.intro
R : Type u
S : Type ?u.180424
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
m n : ℕ
H : m ≤ n
p : R[X]
hpI : p ∈ I
hpdeg : degree p ≤ ↑m
⊢ degree p + degree (X ^ (n - m)) ≤ ↑n

tactic: rw [Nat.cast_withBot, Nat.cast_withBot, ← WithBot.coe_add, add_tsub_cancel_of_le H,
  Nat.cast_withBot]
state_before: case intro.intro.intro
R : Type u
S : Type ?u.180424
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
m n : ℕ
H : m ≤ n
p : R[X]
hpI : p ∈ I
hpdeg : degree p ≤ ↑m
⊢ ↑m + ↑(n - m) ≤ ↑n
Theorem: Antivary.sum_smul_lt_sum_comp_perm_smul_iff
File: Mathlib/Algebra/Order/Rearrangement.lean

tactic: simp [(hfg.antivaryOn _).sum_smul_lt_sum_comp_perm_smul_iff fun _ _ ↦ mem_univ _]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : LinearOrderedRing α
inst✝³ : LinearOrderedAddCommGroup β
inst✝² : Module α β
inst✝¹ : OrderedSMul α β
s : Finset ι
σ : Perm ι
f : ι → α
g : ι → β
inst✝ : Fintype ι
hfg : Antivary f g
⊢ ∑ i : ι, f i • g i < ∑ i : ι, f (↑σ i) • g i ↔ ¬Antivary (f ∘ ↑σ) g
Theorem: LinearMap.toMatrix₂_basisFun
File: Mathlib/LinearAlgebra/Matrix/SesquilinearForm.lean

tactic: ext B
state_before: R : Type u_1
R₁ : Type ?u.1414675
R₂ : Type ?u.1414678
M : Type ?u.1414681
M₁ : Type ?u.1414684
M₂ : Type ?u.1414687
M₁' : Type ?u.1414690
M₂' : Type ?u.1414693
n : Type u_2
m : Type u_3
n' : Type ?u.1414702
m' : Type ?u.1414705
ι : Type ?u.1414708
inst✝⁸ : CommRing R
inst✝⁷ : AddCommMonoid M₁
inst✝⁶ : Module R M₁
inst✝⁵ : AddCommMonoid M₂
inst✝⁴ : Module R M₂
inst✝³ : DecidableEq n
inst✝² : Fintype n
inst✝¹ : DecidableEq m
inst✝ : Fintype m
b₁ : Basis n R M₁
b₂ : Basis m R M₂
⊢ toMatrix₂ (Pi.basisFun R n) (Pi.basisFun R m) = toMatrix₂'

tactic: rw [LinearMap.toMatrix₂_apply, LinearMap.toMatrix₂'_apply, Pi.basisFun_apply, Pi.basisFun_apply]
state_before: case h.a.h
R : Type u_1
R₁ : Type ?u.1414675
R₂ : Type ?u.1414678
M : Type ?u.1414681
M₁ : Type ?u.1414684
M₂ : Type ?u.1414687
M₁' : Type ?u.1414690
M₂' : Type ?u.1414693
n : Type u_2
m : Type u_3
n' : Type ?u.1414702
m' : Type ?u.1414705
ι : Type ?u.1414708
inst✝⁸ : CommRing R
inst✝⁷ : AddCommMonoid M₁
inst✝⁶ : Module R M₁
inst✝⁵ : AddCommMonoid M₂
inst✝⁴ : Module R M₂
inst✝³ : DecidableEq n
inst✝² : Fintype n
inst✝¹ : DecidableEq m
inst✝ : Fintype m
b₁ : Basis n R M₁
b₂ : Basis m R M₂
B : (n → R) →ₗ[R] (m → R) →ₗ[R] R
i✝ : n
x✝ : m
⊢ ↑(toMatrix₂ (Pi.basisFun R n) (Pi.basisFun R m)) B i✝ x✝ = ↑toMatrix₂' B i✝ x✝
Theorem: Real.deriv_tan
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/ArctanDeriv.lean

tactic: have : ¬DifferentiableAt ℝ tan x := mt differentiableAt_tan.1 (Classical.not_not.2 h)
state_before: x : ℝ
h : cos x = 0
⊢ deriv tan x = ↑1 / cos x ^ 2

tactic: simp [deriv_zero_of_not_differentiableAt this, h, sq]
state_before: x : ℝ
h : cos x = 0
this : ¬DifferentiableAt ℝ tan x
⊢ deriv tan x = ↑1 / cos x ^ 2
Theorem: Finset.fold_insert_idem
File: Mathlib/Data/Finset/Fold.lean

tactic: by_cases h : a ∈ s
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.19798
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
inst✝ : DecidableEq α
hi : IsIdempotent β op
⊢ fold op b f (insert a s) = op (f a) (fold op b f s)

tactic: rw [← insert_erase h]
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type ?u.19798
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
inst✝ : DecidableEq α
hi : IsIdempotent β op
h : a ∈ s
⊢ fold op b f (insert a s) = op (f a) (fold op b f s)

tactic: simp [← ha.assoc, hi.idempotent]
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type ?u.19798
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
inst✝ : DecidableEq α
hi : IsIdempotent β op
h : a ∈ s
⊢ fold op b f (insert a (insert a (erase s a))) = op (f a) (fold op b f (insert a (erase s a)))

tactic: apply fold_insert h
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type ?u.19798
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
inst✝ : DecidableEq α
hi : IsIdempotent β op
h : ¬a ∈ s
⊢ fold op b f (insert a s) = op (f a) (fold op b f s)
Theorem: Nat.leRecOn_injective
File: Mathlib/Data/Nat/Basic.lean

tactic: induction' hnm with m hnm ih
state_before: m✝ n✝ k : ℕ
C : ℕ → Sort u
n m : ℕ
hnm : n ≤ m
next : {k : ℕ} → C k → C (k + 1)
Hnext : ∀ (n : ℕ), Function.Injective next
⊢ Function.Injective (leRecOn hnm fun {k} => next)

tactic: intro x y H
state_before: case step
m✝¹ n✝ k : ℕ
C : ℕ → Sort u
n m✝ : ℕ
next : {k : ℕ} → C k → C (k + 1)
Hnext : ∀ (n : ℕ), Function.Injective next
m : ℕ
hnm : Nat.le n m
ih : Function.Injective (leRecOn hnm fun {k} => next)
⊢ Function.Injective (leRecOn (_ : Nat.le n (succ m)) fun {k} => next)

tactic: rw [leRecOn_succ hnm, leRecOn_succ hnm] at H
state_before: case step
m✝¹ n✝ k : ℕ
C : ℕ → Sort u
n m✝ : ℕ
next : {k : ℕ} → C k → C (k + 1)
Hnext : ∀ (n : ℕ), Function.Injective next
m : ℕ
hnm : Nat.le n m
ih : Function.Injective (leRecOn hnm fun {k} => next)
x y : C n
H : leRecOn (_ : Nat.le n (succ m)) (fun {k} => next) x = leRecOn (_ : Nat.le n (succ m)) (fun {k} => next) y
⊢ x = y

tactic: exact ih (Hnext _ H)
state_before: case step
m✝¹ n✝ k : ℕ
C : ℕ → Sort u
n m✝ : ℕ
next : {k : ℕ} → C k → C (k + 1)
Hnext : ∀ (n : ℕ), Function.Injective next
m : ℕ
hnm : Nat.le n m
ih : Function.Injective (leRecOn hnm fun {k} => next)
x y : C n
H : next (leRecOn hnm (fun {k} => next) x) = next (leRecOn hnm (fun {k} => next) y)
⊢ x = y

tactic: intro x y H
state_before: case refl
m✝ n✝ k : ℕ
C : ℕ → Sort u
n m : ℕ
next : {k : ℕ} → C k → C (k + 1)
Hnext : ∀ (n : ℕ), Function.Injective next
⊢ Function.Injective (leRecOn (_ : Nat.le n n) fun {k} => next)

tactic: rwa [leRecOn_self, leRecOn_self] at H
state_before: case refl
m✝ n✝ k : ℕ
C : ℕ → Sort u
n m : ℕ
next : {k : ℕ} → C k → C (k + 1)
Hnext : ∀ (n : ℕ), Function.Injective next
x y : C n
H : leRecOn (_ : Nat.le n n) (fun {k} => next) x = leRecOn (_ : Nat.le n n) (fun {k} => next) y
⊢ x = y
Theorem: Real.surjOn_logb'
File: Mathlib/Analysis/SpecialFunctions/Log/Base.lean

tactic: intro x _
state_before: b x y : ℝ
b_pos : 0 < b
b_ne_one : b ≠ 1
⊢ SurjOn (logb b) (Iio 0) univ

tactic: use -b ^ x
state_before: b x✝ y : ℝ
b_pos : 0 < b
b_ne_one : b ≠ 1
x : ℝ
a✝ : x ∈ univ
⊢ x ∈ logb b '' Iio 0

tactic: constructor
state_before: b x✝ y : ℝ
b_pos : 0 < b
b_ne_one : b ≠ 1
x : ℝ
a✝ : x ∈ univ
⊢ -b ^ x ∈ Iio 0 ∧ logb b (-b ^ x) = x

tactic: simp only [Right.neg_neg_iff, Set.mem_Iio]
state_before: case left
b x✝ y : ℝ
b_pos : 0 < b
b_ne_one : b ≠ 1
x : ℝ
a✝ : x ∈ univ
⊢ -b ^ x ∈ Iio 0

tactic: apply rpow_pos_of_pos b_pos
state_before: case left
b x✝ y : ℝ
b_pos : 0 < b
b_ne_one : b ≠ 1
x : ℝ
a✝ : x ∈ univ
⊢ 0 < b ^ x

tactic: rw [logb_neg_eq_logb, logb_rpow b_pos b_ne_one]
state_before: case right
b x✝ y : ℝ
b_pos : 0 < b
b_ne_one : b ≠ 1
x : ℝ
a✝ : x ∈ univ
⊢ logb b (-b ^ x) = x
Theorem: Submodule.finrank_lt
File: Mathlib/LinearAlgebra/FiniteDimensional.lean

tactic: rw [← s.finrank_quotient_add_finrank, add_comm]
state_before: K : Type u
V : Type v
inst✝³ : DivisionRing K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
s : Submodule K V
h : s < ⊤
⊢ finrank K { x // x ∈ s } < finrank K V

tactic: exact Nat.lt_add_of_pos_right (finrank_pos_iff.mpr (Quotient.nontrivial_of_lt_top _ h))
state_before: K : Type u
V : Type v
inst✝³ : DivisionRing K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
s : Submodule K V
h : s < ⊤
⊢ finrank K { x // x ∈ s } < finrank K { x // x ∈ s } + finrank K (V ⧸ s)
Theorem: BoxIntegral.TaggedPrepartition.IsSubordinate.disjUnion
File: Mathlib/Analysis/BoxIntegral/Partition/Tagged.lean

tactic: refine' fun J hJ => (Finset.mem_union.1 hJ).elim (fun hJ => _) fun hJ => _
state_before: ι : Type u_1
I J : Box ι
π π₁ π₂ : TaggedPrepartition I
x : ι → ℝ
r r₁ r₂ : (ι → ℝ) → ↑(Ioi 0)
inst✝ : Fintype ι
h₁ : IsSubordinate π₁ r
h₂ : IsSubordinate π₂ r
h : Disjoint (iUnion π₁) (iUnion π₂)
⊢ IsSubordinate (TaggedPrepartition.disjUnion π₁ π₂ h) r

tactic: rw [disjUnion_tag_of_mem_left _ hJ]
state_before: case refine'_1
ι : Type u_1
I J✝ : Box ι
π π₁ π₂ : TaggedPrepartition I
x : ι → ℝ
r r₁ r₂ : (ι → ℝ) → ↑(Ioi 0)
inst✝ : Fintype ι
h₁ : IsSubordinate π₁ r
h₂ : IsSubordinate π₂ r
h : Disjoint (iUnion π₁) (iUnion π₂)
J : Box ι
hJ✝ : J ∈ TaggedPrepartition.disjUnion π₁ π₂ h
hJ : J ∈ π₁.boxes
⊢ ↑Box.Icc J ⊆
    closedBall (tag (TaggedPrepartition.disjUnion π₁ π₂ h) J) ↑(r (tag (TaggedPrepartition.disjUnion π₁ π₂ h) J))

tactic: exact h₁ _ hJ
state_before: case refine'_1
ι : Type u_1
I J✝ : Box ι
π π₁ π₂ : TaggedPrepartition I
x : ι → ℝ
r r₁ r₂ : (ι → ℝ) → ↑(Ioi 0)
inst✝ : Fintype ι
h₁ : IsSubordinate π₁ r
h₂ : IsSubordinate π₂ r
h : Disjoint (iUnion π₁) (iUnion π₂)
J : Box ι
hJ✝ : J ∈ TaggedPrepartition.disjUnion π₁ π₂ h
hJ : J ∈ π₁.boxes
⊢ ↑Box.Icc J ⊆ closedBall (tag π₁ J) ↑(r (tag π₁ J))

tactic: rw [disjUnion_tag_of_mem_right _ hJ]
state_before: case refine'_2
ι : Type u_1
I J✝ : Box ι
π π₁ π₂ : TaggedPrepartition I
x : ι → ℝ
r r₁ r₂ : (ι → ℝ) → ↑(Ioi 0)
inst✝ : Fintype ι
h₁ : IsSubordinate π₁ r
h₂ : IsSubordinate π₂ r
h : Disjoint (iUnion π₁) (iUnion π₂)
J : Box ι
hJ✝ : J ∈ TaggedPrepartition.disjUnion π₁ π₂ h
hJ : J ∈ π₂.boxes
⊢ ↑Box.Icc J ⊆
    closedBall (tag (TaggedPrepartition.disjUnion π₁ π₂ h) J) ↑(r (tag (TaggedPrepartition.disjUnion π₁ π₂ h) J))

tactic: exact h₂ _ hJ
state_before: case refine'_2
ι : Type u_1
I J✝ : Box ι
π π₁ π₂ : TaggedPrepartition I
x : ι → ℝ
r r₁ r₂ : (ι → ℝ) → ↑(Ioi 0)
inst✝ : Fintype ι
h₁ : IsSubordinate π₁ r
h₂ : IsSubordinate π₂ r
h : Disjoint (iUnion π₁) (iUnion π₂)
J : Box ι
hJ✝ : J ∈ TaggedPrepartition.disjUnion π₁ π₂ h
hJ : J ∈ π₂.boxes
⊢ ↑Box.Icc J ⊆ closedBall (tag π₂ J) ↑(r (tag π₂ J))
Theorem: Lean.Data.AC.Context.eval_norm
File: src/lean/Init/Data/AC.lean

tactic: simp [norm]
state_before: α : Sort u_1
ctx : Context α
e : Expr
⊢ evalList α ctx (norm ctx e) = eval α ctx e

tactic: cases h₁ : ContextInformation.isIdem ctx <;> cases h₂ : ContextInformation.isComm ctx <;>
simp_all [evalList_removeNeutrals, eval_toList, toList_nonEmpty, evalList_mergeIdem, evalList_sort]
state_before: α : Sort u_1
ctx : Context α
e : Expr
⊢ evalList α ctx
      (if ContextInformation.isIdem ctx = true then
        mergeIdem
          (if ContextInformation.isComm ctx = true then sort (removeNeutrals ctx (Expr.toList e))
          else removeNeutrals ctx (Expr.toList e))
      else
        if ContextInformation.isComm ctx = true then sort (removeNeutrals ctx (Expr.toList e))
        else removeNeutrals ctx (Expr.toList e)) =
    eval α ctx e
Theorem: Finset.Nonempty.of_disjSups_right
File: Mathlib/Data/Finset/Sups.lean

tactic: simp_rw [Finset.Nonempty, mem_disjSups]
state_before: α : Type u_1
inst✝³ : DecidableEq α
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
⊢ Finset.Nonempty (s ○ t) → Finset.Nonempty t

tactic: exact fun ⟨_, _, _, b, hb, _⟩ => ⟨b, hb⟩
state_before: α : Type u_1
inst✝³ : DecidableEq α
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
⊢ (∃ x a, a ∈ s ∧ ∃ b, b ∈ t ∧ Disjoint a b ∧ a ⊔ b = x) → ∃ x, x ∈ t
Theorem: SimpleGraph.deleteEdges_sdiff_eq_of_le
File: Mathlib/Combinatorics/SimpleGraph/Basic.lean

tactic: ext (v w)
state_before: ι : Sort ?u.161200
𝕜 : Type ?u.161203
V : Type u
W : Type v
X : Type w
G : SimpleGraph V
G' : SimpleGraph W
a b c u v w : V
e : Sym2 V
H : SimpleGraph V
h : H ≤ G
⊢ deleteEdges G (edgeSet G \ edgeSet H) = H

tactic: constructor <;> simp (config := { contextual := true }) [@h v w]
state_before: case Adj.h.h.a
ι : Sort ?u.161200
𝕜 : Type ?u.161203
V : Type u
W : Type v
X : Type w
G : SimpleGraph V
G' : SimpleGraph W
a b c u v✝ w✝ : V
e : Sym2 V
H : SimpleGraph V
h : H ≤ G
v w : V
⊢ Adj (deleteEdges G (edgeSet G \ edgeSet H)) v w ↔ Adj H v w
Theorem: Ordering.Compares.eq_lt
File: Mathlib/Order/Compare.lean

tactic: injection h
state_before: α : Type u_1
β : Type ?u.6425
inst✝ : Preorder α
a b : α
h✝ : Compares eq a b
h : eq = lt
⊢ a < b

tactic: injection h
state_before: α : Type u_1
β : Type ?u.6425
inst✝ : Preorder α
a b : α
h✝ : Compares gt a b
h : gt = lt
⊢ a < b
Theorem: CategoryTheory.Adjunction.map_projective
File: Mathlib/CategoryTheory/Preadditive/Projective.lean

tactic: rcases hP.factors (adj.unit.app P ≫ G.map f) (G.map g) with ⟨f', hf'⟩
state_before: C : Type u
inst✝² : Category C
D : Type u'
inst✝¹ : Category D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
inst✝ : Functor.PreservesEpimorphisms G
P : C
hP : Projective P
E✝ X✝ : D
f : F.obj P ⟶ X✝
g : E✝ ⟶ X✝
x✝ : Epi g
⊢ ∃ f', f' ≫ g = f

tactic: use F.map f' ≫ adj.counit.app _
state_before: case intro
C : Type u
inst✝² : Category C
D : Type u'
inst✝¹ : Category D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
inst✝ : Functor.PreservesEpimorphisms G
P : C
hP : Projective P
E✝ X✝ : D
f : F.obj P ⟶ X✝
g : E✝ ⟶ X✝
x✝ : Epi g
f' : P ⟶ G.obj E✝
hf' : f' ≫ G.map g = adj.unit.app P ≫ G.map f
⊢ ∃ f', f' ≫ g = f

tactic: rw [Category.assoc, ← Adjunction.counit_naturality, ← Category.assoc, ← F.map_comp, hf']
state_before: case intro
C : Type u
inst✝² : Category C
D : Type u'
inst✝¹ : Category D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
inst✝ : Functor.PreservesEpimorphisms G
P : C
hP : Projective P
E✝ X✝ : D
f : F.obj P ⟶ X✝
g : E✝ ⟶ X✝
x✝ : Epi g
f' : P ⟶ G.obj E✝
hf' : f' ≫ G.map g = adj.unit.app P ≫ G.map f
⊢ (F.map f' ≫ adj.counit.app E✝) ≫ g = f

tactic: simp
state_before: case intro
C : Type u
inst✝² : Category C
D : Type u'
inst✝¹ : Category D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
inst✝ : Functor.PreservesEpimorphisms G
P : C
hP : Projective P
E✝ X✝ : D
f : F.obj P ⟶ X✝
g : E✝ ⟶ X✝
x✝ : Epi g
f' : P ⟶ G.obj E✝
hf' : f' ≫ G.map g = adj.unit.app P ≫ G.map f
⊢ F.map (adj.unit.app P ≫ G.map f) ≫ adj.counit.app X✝ = f