tasksource/leandojo huggingface dataset:
Theorem: Ordinal.has_succ_of_type_succ_lt
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: use enum r (succ (typein r x)) (h _ (typein_lt_type r x))
state_before: α✝ : Type ?u.100761
β : Type ?u.100764
γ : Type ?u.100767
r✝ : α✝ → α✝ → Prop
s : β → β → Prop
t : γ → γ → Prop
α : Type u_1
r : α → α → Prop
wo : IsWellOrder α r
h : ∀ (a : Ordinal), a < type r → succ a < type r
x : α
⊢ ∃ y, r x y

tactic: convert (enum_lt_enum (typein_lt_type r x)
  (h _ (typein_lt_type r x))).mpr (lt_succ _)
state_before: α✝ : Type ?u.100761
β : Type ?u.100764
γ : Type ?u.100767
r✝ : α✝ → α✝ → Prop
s : β → β → Prop
t : γ → γ → Prop
α : Type u_1
r : α → α → Prop
wo : IsWellOrder α r
h : ∀ (a : Ordinal), a < type r → succ a < type r
x : α
⊢ r x (enum r (succ (typein r x)) (_ : succ (typein r x) < type r))

tactic: rw [enum_typein]
state_before: case h.e'_1
α✝ : Type ?u.100761
β : Type ?u.100764
γ : Type ?u.100767
r✝ : α✝ → α✝ → Prop
s : β → β → Prop
t : γ → γ → Prop
α : Type u_1
r : α → α → Prop
wo : IsWellOrder α r
h : ∀ (a : Ordinal), a < type r → succ a < type r
x : α
⊢ x = enum r (typein r x) (_ : typein r x < type r)
Theorem: Finset.prod_sdiff_eq_div
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: rw [eq_div_iff_mul_eq', prod_sdiff h]
state_before: ι : Type ?u.855554
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝¹ : CommGroup β
inst✝ : DecidableEq α
h : s₁ ⊆ s₂
⊢ ∏ x in s₂ \ s₁, f x = (∏ x in s₂, f x) / ∏ x in s₁, f x
Theorem: LipschitzWith.prod
File: Mathlib/Topology/MetricSpace/Lipschitz.lean

tactic: intro x y
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoEMetricSpace α
inst✝¹ : PseudoEMetricSpace β
inst✝ : PseudoEMetricSpace γ
K : ℝ≥0
f✝ : α → β
x y : α
r : ℝ≥0∞
f : α → β
Kf : ℝ≥0
hf : LipschitzWith Kf f
g : α → γ
Kg : ℝ≥0
hg : LipschitzWith Kg g
⊢ LipschitzWith (max Kf Kg) fun x => (f x, g x)

tactic: rw [ENNReal.coe_mono.map_max, Prod.edist_eq, ENNReal.max_mul]
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoEMetricSpace α
inst✝¹ : PseudoEMetricSpace β
inst✝ : PseudoEMetricSpace γ
K : ℝ≥0
f✝ : α → β
x✝ y✝ : α
r : ℝ≥0∞
f : α → β
Kf : ℝ≥0
hf : LipschitzWith Kf f
g : α → γ
Kg : ℝ≥0
hg : LipschitzWith Kg g
x y : α
⊢ edist ((fun x => (f x, g x)) x) ((fun x => (f x, g x)) y) ≤ ↑(max Kf Kg) * edist x y

tactic: exact max_le_max (hf x y) (hg x y)
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoEMetricSpace α
inst✝¹ : PseudoEMetricSpace β
inst✝ : PseudoEMetricSpace γ
K : ℝ≥0
f✝ : α → β
x✝ y✝ : α
r : ℝ≥0∞
f : α → β
Kf : ℝ≥0
hf : LipschitzWith Kf f
g : α → γ
Kg : ℝ≥0
hg : LipschitzWith Kg g
x y : α
⊢ max (edist ((fun x => (f x, g x)) x).fst ((fun x => (f x, g x)) y).fst)
      (edist ((fun x => (f x, g x)) x).snd ((fun x => (f x, g x)) y).snd) ≤
    max (↑Kf * edist x y) (↑Kg * edist x y)
Theorem: CategoryTheory.Equivalence.unit_app_inverse
File: Mathlib/CategoryTheory/Equivalence.lean

tactic: erw [← Iso.comp_hom_eq_id (e.inverse.mapIso (e.counitIso.app Y)), unit_inverse_comp]
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
e : C ≌ D
Y : D
⊢ (unit e).app (e.inverse.obj Y) = e.inverse.map ((counitInv e).app Y)

tactic: dsimp
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
e : C ≌ D
Y : D
⊢ 𝟙 (e.inverse.obj Y) = 𝟙 (e.inverse.obj ((𝟭 D).obj Y))
Theorem: Nat.sum_properDivisors_eq_one_iff_prime
File: Mathlib/NumberTheory/Divisors.lean

tactic: cases' n with n
state_before: n : ℕ
⊢ ∑ x in properDivisors n, x = 1 ↔ Prime n

tactic: simp [Nat.not_prime_zero]
state_before: case zero

⊢ ∑ x in properDivisors zero, x = 1 ↔ Prime zero

tactic: cases n
state_before: case succ
n : ℕ
⊢ ∑ x in properDivisors (succ n), x = 1 ↔ Prime (succ n)

tactic: simp [Nat.not_prime_one]
state_before: case succ.zero

⊢ ∑ x in properDivisors (succ zero), x = 1 ↔ Prime (succ zero)

tactic: rw [← properDivisors_eq_singleton_one_iff_prime]
state_before: case succ.succ
n✝ : ℕ
⊢ ∑ x in properDivisors (succ (succ n✝)), x = 1 ↔ Prime (succ (succ n✝))

tactic: refine' ⟨fun h => _, fun h => h.symm ▸ sum_singleton⟩
state_before: case succ.succ
n✝ : ℕ
⊢ ∑ x in properDivisors (succ (succ n✝)), x = 1 ↔ properDivisors (succ (succ n✝)) = {1}

tactic: rw [@eq_comm (Finset ℕ) _ _]
state_before: case succ.succ
n✝ : ℕ
h : ∑ x in properDivisors (succ (succ n✝)), x = 1
⊢ properDivisors (succ (succ n✝)) = {1}

tactic: apply
  eq_properDivisors_of_subset_of_sum_eq_sum
    (singleton_subset_iff.2
      (one_mem_properDivisors_iff_one_lt.2 (succ_lt_succ (Nat.succ_pos _))))
    (Eq.trans sum_singleton h.symm)
state_before: case succ.succ
n✝ : ℕ
h : ∑ x in properDivisors (succ (succ n✝)), x = 1
⊢ {1} = properDivisors (succ (succ n✝))
Theorem: Tree.treesOfNumNodesEq_zero
File: Mathlib/Combinatorics/Catalan.lean

tactic: rw [treesOfNumNodesEq]
state_before: ⊢ treesOfNumNodesEq 0 = {nil}
Theorem: Bool.and_coe_iff
File: Mathlib/Init/Data/Bool/Lemmas.lean

tactic: simp
state_before: a b : Bool
⊢ (a && b) = true ↔ a = true ∧ b = true
Theorem: Ordnode.Valid'.balance'_aux
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: rw [balance']
state_before: α : Type u_1
inst✝ : Preorder α
l : Ordnode α
x : α
r : Ordnode α
o₁ : WithBot α
o₂ : WithTop α
hl : Valid' o₁ l ↑x
hr : Valid' (↑x) r o₂
H₁ : 2 * size r ≤ 9 * size l + 5 ∨ size r ≤ 3
H₂ : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3
⊢ Valid' o₁ (balance' l x r) o₂

tactic: split_ifs with h h_1 h_2
state_before: α : Type u_1
inst✝ : Preorder α
l : Ordnode α
x : α
r : Ordnode α
o₁ : WithBot α
o₂ : WithTop α
hl : Valid' o₁ l ↑x
hr : Valid' (↑x) r o₂
H₁ : 2 * size r ≤ 9 * size l + 5 ∨ size r ≤ 3
H₂ : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3
⊢ Valid' o₁
    (if size l + size r ≤ 1 then Ordnode.node' l x r
    else
      if size r > delta * size l then Ordnode.rotateL l x r
      else if size l > delta * size r then Ordnode.rotateR l x r else Ordnode.node' l x r)
    o₂

tactic: exact hl.node' hr (Or.inl h)
state_before: case inl
α : Type u_1
inst✝ : Preorder α
l : Ordnode α
x : α
r : Ordnode α
o₁ : WithBot α
o₂ : WithTop α
hl : Valid' o₁ l ↑x
hr : Valid' (↑x) r o₂
H₁ : 2 * size r ≤ 9 * size l + 5 ∨ size r ≤ 3
H₂ : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3
h : size l + size r ≤ 1
⊢ Valid' o₁ (Ordnode.node' l x r) o₂

tactic: exact hl.rotateL hr h h_1 H₁
state_before: case inr.inl
α : Type u_1
inst✝ : Preorder α
l : Ordnode α
x : α
r : Ordnode α
o₁ : WithBot α
o₂ : WithTop α
hl : Valid' o₁ l ↑x
hr : Valid' (↑x) r o₂
H₁ : 2 * size r ≤ 9 * size l + 5 ∨ size r ≤ 3
H₂ : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3
h : ¬size l + size r ≤ 1
h_1 : size r > delta * size l
⊢ Valid' o₁ (Ordnode.rotateL l x r) o₂

tactic: exact hl.rotateR hr h h_2 H₂
state_before: case inr.inr.inl
α : Type u_1
inst✝ : Preorder α
l : Ordnode α
x : α
r : Ordnode α
o₁ : WithBot α
o₂ : WithTop α
hl : Valid' o₁ l ↑x
hr : Valid' (↑x) r o₂
H₁ : 2 * size r ≤ 9 * size l + 5 ∨ size r ≤ 3
H₂ : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3
h : ¬size l + size r ≤ 1
h_1 : ¬size r > delta * size l
h_2 : size l > delta * size r
⊢ Valid' o₁ (Ordnode.rotateR l x r) o₂

tactic: exact hl.node' hr (Or.inr ⟨not_lt.1 h_2, not_lt.1 h_1⟩)
state_before: case inr.inr.inr
α : Type u_1
inst✝ : Preorder α
l : Ordnode α
x : α
r : Ordnode α
o₁ : WithBot α
o₂ : WithTop α
hl : Valid' o₁ l ↑x
hr : Valid' (↑x) r o₂
H₁ : 2 * size r ≤ 9 * size l + 5 ∨ size r ≤ 3
H₂ : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3
h : ¬size l + size r ≤ 1
h_1 : ¬size r > delta * size l
h_2 : ¬size l > delta * size r
⊢ Valid' o₁ (Ordnode.node' l x r) o₂
Theorem: CategoryTheory.Limits.limitConstTerminal_inv_π
File: Mathlib/CategoryTheory/Limits/Shapes/Terminal.lean

tactic: apply Limits.limit.hom_ext
state_before: C✝ : Type u₁
inst✝³ : Category C✝
J : Type u_1
inst✝² : Category J
C : Type u_3
inst✝¹ : Category C
inst✝ : HasTerminal C
j : J
⊢ limitConstTerminal.inv ≫ limit.π ((Functor.const J).obj (⊤_ C)) j = terminal.from (⊤_ C)

tactic: aesop_cat
state_before: case w
C✝ : Type u₁
inst✝³ : Category C✝
J : Type u_1
inst✝² : Category J
C : Type u_3
inst✝¹ : Category C
inst✝ : HasTerminal C
j : J
⊢ ∀ (j_1 : Discrete PEmpty),
    (limitConstTerminal.inv ≫ limit.π ((Functor.const J).obj (⊤_ C)) j) ≫ limit.π (Functor.empty C) j_1 =
      terminal.from (⊤_ C) ≫ limit.π (Functor.empty C) j_1
Theorem: CategoryTheory.Limits.hasZeroObject_of_hasTerminal_object
File: Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean

tactic: refine' ⟨⟨⊤_ C, fun X => ⟨⟨⟨0⟩, fun f => _⟩⟩, fun X => ⟨⟨⟨0⟩, by aesop_cat⟩⟩⟩⟩
state_before: C : Type u
inst✝³ : Category C
D : Type u'
inst✝² : Category D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasTerminal C
⊢ HasZeroObject C

tactic: calc
  f = 𝟙 _ ≫ f := (Category.id_comp _).symm
  _ = 0 ≫ f := by congr!
  _ = 0 := zero_comp
state_before: C : Type u
inst✝³ : Category C
D : Type u'
inst✝² : Category D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasTerminal C
X : C
f : ⊤_ C ⟶ X
⊢ f = default

tactic: aesop_cat
state_before: C : Type u
inst✝³ : Category C
D : Type u'
inst✝² : Category D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasTerminal C
X : C
⊢ ∀ (a : X ⟶ ⊤_ C), a = default

tactic: congr!
state_before: C : Type u
inst✝³ : Category C
D : Type u'
inst✝² : Category D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasTerminal C
X : C
f : ⊤_ C ⟶ X
⊢ 𝟙 (⊤_ C) ≫ f = 0 ≫ f
Theorem: Set.image_mul_left_Icc'
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: convert image_mul_right_Icc' b c h using 1 <;> simp only [mul_comm _ a]
state_before: α : Type u_1
inst✝ : LinearOrderedField α
a✝ a : α
h : 0 < a
b c : α
⊢ (fun x x_1 => x * x_1) a '' Icc b c = Icc (a * b) (a * c)
Theorem: circleIntegral.integral_sub_center_inv
File: Mathlib/MeasureTheory/Integral/CircleIntegral.lean

tactic: simp [circleIntegral, ← div_eq_mul_inv, mul_div_cancel_left _ (circleMap_ne_center hR),
  intervalIntegral.integral_const I]
state_before: E : Type ?u.610728
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
hR : R ≠ 0
⊢ (∮ (z : ℂ) in C(c, R), (z - c)⁻¹) = 2 * ↑π * I
Theorem: AddLECancellable.tsub_lt_iff_tsub_lt
File: Mathlib/Algebra/Order/Sub/Canonical.lean

tactic: rw [hb.tsub_lt_iff_left h₁, hc.tsub_lt_iff_right h₂]
state_before: α : Type u_1
inst✝⁵ : AddCommSemigroup α
inst✝⁴ : PartialOrder α
inst✝³ : ExistsAddOfLE α
inst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
hb : AddLECancellable b
hc : AddLECancellable c
h₁ : b ≤ a
h₂ : c ≤ a
⊢ a - b < c ↔ a - c < b
Theorem: neg_eq_neg_one_mul
File: Mathlib/Algebra/Ring/Defs.lean

tactic: simp
state_before: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝¹ : MulOneClass α
inst✝ : HasDistribNeg α
a : α
⊢ -a = -1 * a
Theorem: associatedPrimes.eq_empty_of_subsingleton
File: Mathlib/RingTheory/Ideal/AssociatedPrime.lean

tactic: ext
state_before: R : Type u_2
inst✝⁵ : CommRing R
I J : Ideal R
M : Type u_1
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
M' : Type ?u.60520
inst✝² : AddCommGroup M'
inst✝¹ : Module R M'
f : M →ₗ[R] M'
inst✝ : Subsingleton M
⊢ associatedPrimes R M = ∅

tactic: simp only [Set.mem_empty_iff_false, iff_false_iff]
state_before: case h
R : Type u_2
inst✝⁵ : CommRing R
I J : Ideal R
M : Type u_1
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
M' : Type ?u.60520
inst✝² : AddCommGroup M'
inst✝¹ : Module R M'
f : M →ₗ[R] M'
inst✝ : Subsingleton M
x✝ : Ideal R
⊢ x✝ ∈ associatedPrimes R M ↔ x✝ ∈ ∅

tactic: apply not_isAssociatedPrime_of_subsingleton
state_before: case h
R : Type u_2
inst✝⁵ : CommRing R
I J : Ideal R
M : Type u_1
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
M' : Type ?u.60520
inst✝² : AddCommGroup M'
inst✝¹ : Module R M'
f : M →ₗ[R] M'
inst✝ : Subsingleton M
x✝ : Ideal R
⊢ ¬x✝ ∈ associatedPrimes R M
Theorem: mem_connectedComponentIn
File: Mathlib/Topology/Connected.lean

tactic: simp [connectedComponentIn_eq_image hx, mem_connectedComponent, hx]
state_before: α : Type u
β : Type v
ι : Type ?u.46668
π : ι → Type ?u.46673
inst✝ : TopologicalSpace α
s t u v : Set α
x : α
F : Set α
hx : x ∈ F
⊢ x ∈ connectedComponentIn F x
Theorem: Filter.mem_of_eq_bot
File: Mathlib/Order/Filter/Basic.lean

tactic: rwa [inf_principal_eq_bot, compl_compl] at h
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.119773
ι : Sort x
f✝ g : Filter α
s✝ t : Set α
f : Filter α
s : Set α
h : f ⊓ 𝓟 (sᶜ) = ⊥
⊢ s ∈ f
Theorem: Real.exists_cos_eq_zero
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

tactic: norm_num
state_before: ⊢ 1 ≤ 2
Theorem: Set.mem_dite_empty_left
File: Mathlib/Data/Set/Basic.lean

tactic: simp only [mem_dite, mem_empty_iff_false, imp_false]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t✝ t₁ t₂ u : Set α
p : Prop
inst✝ : Decidable p
t : ¬p → Set α
x : α
⊢ (x ∈ if h : p then ∅ else t h) ↔ ∃ h, x ∈ t h

tactic: exact ⟨fun h => ⟨h.1, h.2 h.1⟩, fun ⟨h₁, h₂⟩ => ⟨fun h => h₁ h, fun _ => h₂⟩⟩
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t✝ t₁ t₂ u : Set α
p : Prop
inst✝ : Decidable p
t : ¬p → Set α
x : α
⊢ (¬p ∧ ∀ (h : ¬p), x ∈ t h) ↔ ∃ h, x ∈ t h
Theorem: Ordinal.IsNormal.apply_le_nfp
File: Mathlib/SetTheory/Ordinal/FixedPoint.lean

tactic: simpa only [H.nfp_fp] using H.le_iff.2 h
state_before: f✝ : Ordinal → Ordinal
f : Ordinal → Ordinal
H : IsNormal f
a b : Ordinal
h : b ≤ nfp f a
⊢ f b ≤ nfp f a
Theorem: AntilipschitzWith.comap_uniformity_le
File: Mathlib/Topology/MetricSpace/Antilipschitz.lean

tactic: refine ((uniformity_basis_edist.comap _).le_basis_iff uniformity_basis_edist).2 fun ε h₀ => ?_
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.10552
inst✝² : PseudoEMetricSpace α
inst✝¹ : PseudoEMetricSpace β
inst✝ : PseudoEMetricSpace γ
K : ℝ≥0
f : α → β
hf : AntilipschitzWith K f
⊢ comap (Prod.map f f) (𝓤 β) ≤ 𝓤 α

tactic: refine ⟨(↑K)⁻¹ * ε, ENNReal.mul_pos (ENNReal.inv_ne_zero.2 ENNReal.coe_ne_top) h₀.ne', ?_⟩
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.10552
inst✝² : PseudoEMetricSpace α
inst✝¹ : PseudoEMetricSpace β
inst✝ : PseudoEMetricSpace γ
K : ℝ≥0
f : α → β
hf : AntilipschitzWith K f
ε : ℝ≥0∞
h₀ : 0 < ε
⊢ ∃ i, 0 < i ∧ Prod.map f f ⁻¹' {p | edist p.fst p.snd < i} ⊆ {p | edist p.fst p.snd < ε}

tactic: refine' fun x hx => (hf x.1 x.2).trans_lt _
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.10552
inst✝² : PseudoEMetricSpace α
inst✝¹ : PseudoEMetricSpace β
inst✝ : PseudoEMetricSpace γ
K : ℝ≥0
f : α → β
hf : AntilipschitzWith K f
ε : ℝ≥0∞
h₀ : 0 < ε
⊢ Prod.map f f ⁻¹' {p | edist p.fst p.snd < (↑K)⁻¹ * ε} ⊆ {p | edist p.fst p.snd < ε}

tactic: rw [mul_comm, ← div_eq_mul_inv] at hx
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.10552
inst✝² : PseudoEMetricSpace α
inst✝¹ : PseudoEMetricSpace β
inst✝ : PseudoEMetricSpace γ
K : ℝ≥0
f : α → β
hf : AntilipschitzWith K f
ε : ℝ≥0∞
h₀ : 0 < ε
x : α × α
hx : x ∈ Prod.map f f ⁻¹' {p | edist p.fst p.snd < (↑K)⁻¹ * ε}
⊢ ↑K * edist (f x.fst) (f x.snd) < ε

tactic: rw [mul_comm]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.10552
inst✝² : PseudoEMetricSpace α
inst✝¹ : PseudoEMetricSpace β
inst✝ : PseudoEMetricSpace γ
K : ℝ≥0
f : α → β
hf : AntilipschitzWith K f
ε : ℝ≥0∞
h₀ : 0 < ε
x : α × α
hx : x ∈ Prod.map f f ⁻¹' {p | edist p.fst p.snd < ε / ↑K}
⊢ ↑K * edist (f x.fst) (f x.snd) < ε

tactic: exact ENNReal.mul_lt_of_lt_div hx
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.10552
inst✝² : PseudoEMetricSpace α
inst✝¹ : PseudoEMetricSpace β
inst✝ : PseudoEMetricSpace γ
K : ℝ≥0
f : α → β
hf : AntilipschitzWith K f
ε : ℝ≥0∞
h₀ : 0 < ε
x : α × α
hx : x ∈ Prod.map f f ⁻¹' {p | edist p.fst p.snd < ε / ↑K}
⊢ edist (f x.fst) (f x.snd) * ↑K < ε
Theorem: Cardinal.add_le_max
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: cases' le_or_lt ℵ₀ a with ha ha
state_before: a b : Cardinal
⊢ a + b ≤ max (max a b) ℵ₀

tactic: rw [add_eq_max ha]
state_before: case inl
a b : Cardinal
ha : ℵ₀ ≤ a
⊢ a + b ≤ max (max a b) ℵ₀

tactic: exact le_max_left _ _
state_before: case inl
a b : Cardinal
ha : ℵ₀ ≤ a
⊢ max a b ≤ max (max a b) ℵ₀

tactic: cases' le_or_lt ℵ₀ b with hb hb
state_before: case inr
a b : Cardinal
ha : a < ℵ₀
⊢ a + b ≤ max (max a b) ℵ₀

tactic: rw [add_comm, add_eq_max hb, max_comm]
state_before: case inr.inl
a b : Cardinal
ha : a < ℵ₀
hb : ℵ₀ ≤ b
⊢ a + b ≤ max (max a b) ℵ₀

tactic: exact le_max_left _ _
state_before: case inr.inl
a b : Cardinal
ha : a < ℵ₀
hb : ℵ₀ ≤ b
⊢ max a b ≤ max (max a b) ℵ₀

tactic: exact le_max_of_le_right (add_lt_aleph0 ha hb).le
state_before: case inr.inr
a b : Cardinal
ha : a < ℵ₀
hb : b < ℵ₀
⊢ a + b ≤ max (max a b) ℵ₀
Theorem: Cardinal.aleph_limit
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: apply le_antisymm _ (ciSup_le' _)
state_before: o : Ordinal
ho : Ordinal.IsLimit o
⊢ aleph o = ⨆ (a : ↑(Iio o)), aleph ↑a

tactic: rw [aleph, aleph'_limit (ho.add _)]
state_before: o : Ordinal
ho : Ordinal.IsLimit o
⊢ aleph o ≤ ⨆ (i : ↑(Iio o)), aleph ↑i

tactic: refine' ciSup_mono' (bddAbove_of_small _) _
state_before: o : Ordinal
ho : Ordinal.IsLimit o
⊢ (⨆ (a : ↑(Iio (ω + o))), aleph' ↑a) ≤ ⨆ (i : ↑(Iio o)), aleph ↑i

tactic: rintro ⟨i, hi⟩
state_before: o : Ordinal
ho : Ordinal.IsLimit o
⊢ ∀ (i : ↑(Iio (ω + o))), ∃ i', aleph' ↑i ≤ aleph ↑i'

tactic: cases' lt_or_le i ω with h h
state_before: case mk
o : Ordinal
ho : Ordinal.IsLimit o
i : Ordinal
hi : i ∈ Iio (ω + o)
⊢ ∃ i', aleph' ↑{ val := i, property := hi } ≤ aleph ↑i'

tactic: rcases lt_omega.1 h with ⟨n, rfl⟩
state_before: case mk.inl
o : Ordinal
ho : Ordinal.IsLimit o
i : Ordinal
hi : i ∈ Iio (ω + o)
h : i < ω
⊢ ∃ i', aleph' ↑{ val := i, property := hi } ≤ aleph ↑i'

tactic: use ⟨0, ho.pos⟩
state_before: case mk.inl.intro
o : Ordinal
ho : Ordinal.IsLimit o
n : ℕ
hi : ↑n ∈ Iio (ω + o)
h : ↑n < ω
⊢ ∃ i', aleph' ↑{ val := ↑n, property := hi } ≤ aleph ↑i'

tactic: simpa using (nat_lt_aleph0 n).le
state_before: case mk.inl.intro
o : Ordinal
ho : Ordinal.IsLimit o
n : ℕ
hi : ↑n ∈ Iio (ω + o)
h : ↑n < ω
⊢ aleph' ↑{ val := ↑n, property := hi } ≤ aleph ↑{ val := 0, property := (_ : 0 < o) }

tactic: exact ⟨⟨_, (sub_lt_of_le h).2 hi⟩, aleph'_le.2 (le_add_sub _ _)⟩
state_before: case mk.inr
o : Ordinal
ho : Ordinal.IsLimit o
i : Ordinal
hi : i ∈ Iio (ω + o)
h : ω ≤ i
⊢ ∃ i', aleph' ↑{ val := i, property := hi } ≤ aleph ↑i'

tactic: exact fun i => aleph_le.2 (le_of_lt i.2)
state_before: o : Ordinal
ho : Ordinal.IsLimit o
⊢ ∀ (i : ↑(Iio o)), aleph ↑i ≤ aleph o
Theorem: one_le_pow_iff_of_nonneg
File: Mathlib/Algebra/GroupPower/Order.lean

tactic: refine' ⟨_, fun h => one_le_pow_of_one_le h n⟩
state_before: β : Type ?u.237881
A : Type ?u.237884
G : Type ?u.237887
M : Type ?u.237890
R : Type u_1
inst✝ : LinearOrderedSemiring R
a✝ b a : R
ha : 0 ≤ a
n : ℕ
hn : n ≠ 0
⊢ 1 ≤ a ^ n ↔ 1 ≤ a

tactic: rw [← not_lt, ← not_lt]
state_before: β : Type ?u.237881
A : Type ?u.237884
G : Type ?u.237887
M : Type ?u.237890
R : Type u_1
inst✝ : LinearOrderedSemiring R
a✝ b a : R
ha : 0 ≤ a
n : ℕ
hn : n ≠ 0
⊢ 1 ≤ a ^ n → 1 ≤ a

tactic: exact mt fun h => pow_lt_one ha h hn
state_before: β : Type ?u.237881
A : Type ?u.237884
G : Type ?u.237887
M : Type ?u.237890
R : Type u_1
inst✝ : LinearOrderedSemiring R
a✝ b a : R
ha : 0 ≤ a
n : ℕ
hn : n ≠ 0
⊢ ¬a ^ n < 1 → ¬a < 1
Theorem: Ordinal.bsup_eq_blsub_of_lt_succ_limit
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: rw [bsup_eq_blsub_iff_lt_bsup]
state_before: α : Type ?u.356828
β : Type ?u.356831
γ : Type ?u.356834
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal
ho : IsLimit o
f : (a : Ordinal) → a < o → Ordinal
hf : ∀ (a : Ordinal) (ha : a < o), f a ha < f (succ a) (_ : succ a < o)
⊢ bsup o f = blsub o f

tactic: exact fun i hi => (hf i hi).trans_le (le_bsup f _ _)
state_before: α : Type ?u.356828
β : Type ?u.356831
γ : Type ?u.356834
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal
ho : IsLimit o
f : (a : Ordinal) → a < o → Ordinal
hf : ∀ (a : Ordinal) (ha : a < o), f a ha < f (succ a) (_ : succ a < o)
⊢ ∀ (i : Ordinal) (hi : i < o), f i hi < bsup o f
Theorem: Complex.norm_deriv_le_div_of_mapsTo_ball
File: Mathlib/Analysis/Complex/Schwarz.lean

tactic: simpa only [dslope_same] using norm_dslope_le_div_of_mapsTo_ball hd h_maps (mem_ball_self h₀)
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
R R₁ R₂ : ℝ
f : ℂ → E
c z z₀ : ℂ
hd : DifferentiableOn ℂ f (ball c R₁)
h_maps : MapsTo f (ball c R₁) (ball (f c) R₂)
h₀ : 0 < R₁
⊢ ‖deriv f c‖ ≤ R₂ / R₁
Theorem: Metric.closedBall_subset_cthickening_singleton
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: rcases lt_or_le δ 0 with (hδ | hδ)
state_before: ι : Sort ?u.107462
α✝ : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α✝
δ✝ ε : ℝ
s t : Set α✝
x✝ : α✝
α : Type u_1
inst✝ : PseudoMetricSpace α
x : α
δ : ℝ
⊢ closedBall x δ ⊆ cthickening δ {x}

tactic: simp only [closedBall_eq_empty.mpr hδ, empty_subset]
state_before: case inl
ι : Sort ?u.107462
α✝ : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α✝
δ✝ ε : ℝ
s t : Set α✝
x✝ : α✝
α : Type u_1
inst✝ : PseudoMetricSpace α
x : α
δ : ℝ
hδ : δ < 0
⊢ closedBall x δ ⊆ cthickening δ {x}

tactic: simp only [cthickening_singleton x hδ, Subset.rfl]
state_before: case inr
ι : Sort ?u.107462
α✝ : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α✝
δ✝ ε : ℝ
s t : Set α✝
x✝ : α✝
α : Type u_1
inst✝ : PseudoMetricSpace α
x : α
δ : ℝ
hδ : 0 ≤ δ
⊢ closedBall x δ ⊆ cthickening δ {x}
Theorem: Nat.findGreatest_of_not
File: Mathlib/Data/Nat/Basic.lean

tactic: simp [Nat.findGreatest, h]
state_before: m n k : ℕ
P Q : ℕ → Prop
inst✝ : DecidablePred P
b : ℕ
h : ¬P (b + 1)
⊢ Nat.findGreatest P (b + 1) = Nat.findGreatest P b
Theorem: Equiv.forall_congr_left'
File: Mathlib/Logic/Equiv/Defs.lean

tactic: simp
state_before: α : Sort u
β : Sort v
γ : Sort w
p : α → Prop
f : α ≃ β
⊢ ∀ {x : α}, p x ↔ p (↑f.symm (↑f x))
Theorem: Bool.xor_self
File: Mathlib/Init/Data/Bool/Lemmas.lean

tactic: cases b <;> simp
state_before: b : Bool
⊢ xor b b = false
Theorem: minpoly.eq_of_irreducible
File: Mathlib/FieldTheory/Minpoly/Field.lean

tactic: have : p.leadingCoeff ≠ 0 := leadingCoeff_ne_zero.mpr hp1.ne_zero
state_before: A : Type u_2
B : Type u_1
inst✝³ : Field A
inst✝² : Ring B
inst✝¹ : Algebra A B
x : B
inst✝ : Nontrivial B
p : A[X]
hp1 : Irreducible p
hp2 : ↑(Polynomial.aeval x) p = 0
⊢ p * ↑C (leadingCoeff p)⁻¹ = minpoly A x

tactic: apply eq_of_irreducible_of_monic
state_before: A : Type u_2
B : Type u_1
inst✝³ : Field A
inst✝² : Ring B
inst✝¹ : Algebra A B
x : B
inst✝ : Nontrivial B
p : A[X]
hp1 : Irreducible p
hp2 : ↑(Polynomial.aeval x) p = 0
this : leadingCoeff p ≠ 0
⊢ p * ↑C (leadingCoeff p)⁻¹ = minpoly A x

tactic: exact Associated.irreducible ⟨⟨C p.leadingCoeff⁻¹, C p.leadingCoeff,
  by rwa [← C_mul, inv_mul_cancel, C_1], by rwa [← C_mul, mul_inv_cancel, C_1]⟩, rfl⟩ hp1
state_before: case hp1
A : Type u_2
B : Type u_1
inst✝³ : Field A
inst✝² : Ring B
inst✝¹ : Algebra A B
x : B
inst✝ : Nontrivial B
p : A[X]
hp1 : Irreducible p
hp2 : ↑(Polynomial.aeval x) p = 0
this : leadingCoeff p ≠ 0
⊢ Irreducible (p * ↑C (leadingCoeff p)⁻¹)

tactic: rwa [← C_mul, inv_mul_cancel, C_1]
state_before: A : Type u_2
B : Type u_1
inst✝³ : Field A
inst✝² : Ring B
inst✝¹ : Algebra A B
x : B
inst✝ : Nontrivial B
p : A[X]
hp1 : Irreducible p
hp2 : ↑(Polynomial.aeval x) p = 0
this : leadingCoeff p ≠ 0
⊢ ↑C (leadingCoeff p)⁻¹ * ↑C (leadingCoeff p) = 1

tactic: rwa [← C_mul, mul_inv_cancel, C_1]
state_before: A : Type u_2
B : Type u_1
inst✝³ : Field A
inst✝² : Ring B
inst✝¹ : Algebra A B
x : B
inst✝ : Nontrivial B
p : A[X]
hp1 : Irreducible p
hp2 : ↑(Polynomial.aeval x) p = 0
this : leadingCoeff p ≠ 0
⊢ ↑C (leadingCoeff p) * ↑C (leadingCoeff p)⁻¹ = 1

tactic: rw [aeval_mul, hp2, MulZeroClass.zero_mul]
state_before: case hp2
A : Type u_2
B : Type u_1
inst✝³ : Field A
inst✝² : Ring B
inst✝¹ : Algebra A B
x : B
inst✝ : Nontrivial B
p : A[X]
hp1 : Irreducible p
hp2 : ↑(Polynomial.aeval x) p = 0
this : leadingCoeff p ≠ 0
⊢ ↑(Polynomial.aeval x) (p * ↑C (leadingCoeff p)⁻¹) = 0

tactic: rwa [Polynomial.Monic, leadingCoeff_mul, leadingCoeff_C, mul_inv_cancel]
state_before: case hp3
A : Type u_2
B : Type u_1
inst✝³ : Field A
inst✝² : Ring B
inst✝¹ : Algebra A B
x : B
inst✝ : Nontrivial B
p : A[X]
hp1 : Irreducible p
hp2 : ↑(Polynomial.aeval x) p = 0
this : leadingCoeff p ≠ 0
⊢ Monic (p * ↑C (leadingCoeff p)⁻¹)