1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Nat.filter_range_nth_eq_insert
File: Mathlib/Data/Nat/Nth.lean

tactic: refine (filter_range_nth_subset_insert p k).antisymm fun a ha => ?_
state_before: p : ℕ → Prop
inst✝ : DecidablePred p
k : ℕ
hlt : ∀ (hf : (setOf p).Finite), k + 1 < hf.toFinset.card
⊢ filter p (range (nth p (k + 1))) = insert (nth p k) (filter p (range (nth p k)))
state_after: p : ℕ → Prop
inst✝ : DecidablePred p
k : ℕ
hlt : ∀ (hf : (setOf p).Finite), k + 1 < hf.toFinset.card
a : ℕ
ha : a ∈ insert (nth p k) (filter p (range (nth p k)))
⊢ a ∈ filter p (range (nth p (k + 1)))

tactic: simp only [mem_insert, mem_filter, mem_range] at ha ⊢
state_before: p : ℕ → Prop
inst✝ : DecidablePred p
k : ℕ
hlt : ∀ (hf : (setOf p).Finite), k + 1 < hf.toFinset.card
a : ℕ
ha : a ∈ insert (nth p k) (filter p (range (nth p k)))
⊢ a ∈ filter p (range (nth p (k + 1)))
state_after: p : ℕ → Prop
inst✝ : DecidablePred p
k : ℕ
hlt : ∀ (hf : (setOf p).Finite), k + 1 < hf.toFinset.card
a : ℕ
ha : a = nth p k ∨ a < nth p k ∧ p a
⊢ a < nth p (k + 1) ∧ p a

tactic: have : nth p k < nth p (k + 1) := nth_lt_nth' k.lt_succ_self hlt
state_before: p : ℕ → Prop
inst✝ : DecidablePred p
k : ℕ
hlt : ∀ (hf : (setOf p).Finite), k + 1 < hf.toFinset.card
a : ℕ
ha : a = nth p k ∨ a < nth p k ∧ p a
⊢ a < nth p (k + 1) ∧ p a
state_after: p : ℕ → Prop
inst✝ : DecidablePred p
k : ℕ
hlt : ∀ (hf : (setOf p).Finite), k + 1 < hf.toFinset.card
a : ℕ
ha : a = nth p k ∨ a < nth p k ∧ p a
this : nth p k < nth p (k + 1)
⊢ a < nth p (k + 1) ∧ p a

tactic: rcases ha with (rfl | ⟨hlt, hpa⟩)
state_before: p : ℕ → Prop
inst✝ : DecidablePred p
k : ℕ
hlt : ∀ (hf : (setOf p).Finite), k + 1 < hf.toFinset.card
a : ℕ
ha : a = nth p k ∨ a < nth p k ∧ p a
this : nth p k < nth p (k + 1)
⊢ a < nth p (k + 1) ∧ p a
state_after: case inl
p : ℕ → Prop
inst✝ : DecidablePred p
k : ℕ
hlt : ∀ (hf : (setOf p).Finite), k + 1 < hf.toFinset.card
this : nth p k < nth p (k + 1)
⊢ nth p k < nth p (k + 1) ∧ p (nth p k)

case inr.intro
p : ℕ → Prop
inst✝ : DecidablePred p
k : ℕ
hlt✝ : ∀ (hf : (setOf p).Finite), k + 1 < hf.toFinset.card
a : ℕ
this : nth p k < nth p (k + 1)
hlt : a < nth p k
hpa : p a
⊢ a < nth p (k + 1) ∧ p a

tactic: exact ⟨this, nth_mem _ fun hf => k.lt_succ_self.trans (hlt hf)⟩
state_before: case inl
p : ℕ → Prop
inst✝ : DecidablePred p
k : ℕ
hlt : ∀ (hf : (setOf p).Finite), k + 1 < hf.toFinset.card
this : nth p k < nth p (k + 1)
⊢ nth p k < nth p (k + 1) ∧ p (nth p k)
state_after: no goals

tactic: exact ⟨hlt.trans this, hpa⟩
state_before: case inr.intro
p : ℕ → Prop
inst✝ : DecidablePred p
k : ℕ
hlt✝ : ∀ (hf : (setOf p).Finite), k + 1 < hf.toFinset.card
a : ℕ
this : nth p k < nth p (k + 1)
hlt : a < nth p k
hpa : p a
⊢ a < nth p (k + 1) ∧ p a
state_after: no goals
Theorem: WeierstrassCurve.natDegree_preΨ₄_pos
File: Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Degree.lean

tactic: linarith only [W.natDegree_preΨ₄ h]
state_before: R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
h : 2 ≠ 0
⊢ 0 < W.preΨ₄.natDegree
state_after: no goals
Theorem: List.getElem_zipWith
File: Mathlib/Data/List/Zip.lean

tactic: rw [← Option.some_inj, ← getElem?_eq_getElem, getElem?_zip_with_eq_some]
state_before: α : Type u
β : Type u_1
γ : Type u_2
δ : Type u_3
ε : Type u_4
f : α → β → γ
l : List α
l' : List β
i : ℕ
h : i < (zipWith f l l').length
⊢ (zipWith f l l')[i] = f l[i] l'[i]
state_after: α : Type u
β : Type u_1
γ : Type u_2
δ : Type u_3
ε : Type u_4
f : α → β → γ
l : List α
l' : List β
i : ℕ
h : i < (zipWith f l l').length
⊢ ∃ x y, l[i]? = some x ∧ l'[i]? = some y ∧ f x y = f l[i] l'[i]

tactic: exact
  ⟨l[i]'(lt_length_left_of_zipWith h), l'[i]'(lt_length_right_of_zipWith h),
    by rw [getElem?_eq_getElem], by rw [getElem?_eq_getElem]; exact ⟨rfl, rfl⟩⟩
state_before: α : Type u
β : Type u_1
γ : Type u_2
δ : Type u_3
ε : Type u_4
f : α → β → γ
l : List α
l' : List β
i : ℕ
h : i < (zipWith f l l').length
⊢ ∃ x y, l[i]? = some x ∧ l'[i]? = some y ∧ f x y = f l[i] l'[i]
state_after: no goals

tactic: rw [getElem?_eq_getElem]
state_before: α : Type u
β : Type u_1
γ : Type u_2
δ : Type u_3
ε : Type u_4
f : α → β → γ
l : List α
l' : List β
i : ℕ
h : i < (zipWith f l l').length
⊢ l[i]? = some l[i]
state_after: no goals

tactic: rw [getElem?_eq_getElem]
state_before: α : Type u
β : Type u_1
γ : Type u_2
δ : Type u_3
ε : Type u_4
f : α → β → γ
l : List α
l' : List β
i : ℕ
h : i < (zipWith f l l').length
⊢ l'[i]? = some l'[i] ∧ f l[i] l'[i] = f l[i] l'[i]
state_after: α : Type u
β : Type u_1
γ : Type u_2
δ : Type u_3
ε : Type u_4
f : α → β → γ
l : List α
l' : List β
i : ℕ
h : i < (zipWith f l l').length
⊢ some l'[i] = some l'[i] ∧ f l[i] l'[i] = f l[i] l'[i]

α : Type u
β : Type u_1
γ : Type u_2
δ : Type u_3
ε : Type u_4
f : α → β → γ
l : List α
l' : List β
i : ℕ
h : i < (zipWith f l l').length
⊢ i < l'.length

tactic: exact ⟨rfl, rfl⟩
state_before: α : Type u
β : Type u_1
γ : Type u_2
δ : Type u_3
ε : Type u_4
f : α → β → γ
l : List α
l' : List β
i : ℕ
h : i < (zipWith f l l').length
⊢ some l'[i] = some l'[i] ∧ f l[i] l'[i] = f l[i] l'[i]

α : Type u
β : Type u_1
γ : Type u_2
δ : Type u_3
ε : Type u_4
f : α → β → γ
l : List α
l' : List β
i : ℕ
h : i < (zipWith f l l').length
⊢ i < l'.length
state_after: no goals
Theorem: FirstOrder.Language.Theory.IsMaximal.mem_of_models
File: Mathlib/ModelTheory/Satisfiability.lean

tactic: refine (h.mem_or_not_mem φ).resolve_right fun con => ?_
state_before: L : Language
T : L.Theory
α : Type w
n : ℕ
h : T.IsMaximal
φ : L.Sentence
hφ : T ⊨ᵇ φ
⊢ φ ∈ T
state_after: L : Language
T : L.Theory
α : Type w
n : ℕ
h : T.IsMaximal
φ : L.Sentence
hφ : T ⊨ᵇ φ
con : Formula.not φ ∈ T
⊢ False

tactic: rw [models_iff_not_satisfiable, Set.union_singleton, Set.insert_eq_of_mem con] at hφ
state_before: L : Language
T : L.Theory
α : Type w
n : ℕ
h : T.IsMaximal
φ : L.Sentence
hφ : T ⊨ᵇ φ
con : Formula.not φ ∈ T
⊢ False
state_after: L : Language
T : L.Theory
α : Type w
n : ℕ
h : T.IsMaximal
φ : L.Sentence
hφ : ¬T.IsSatisfiable
con : Formula.not φ ∈ T
⊢ False

tactic: exact hφ h.1
state_before: L : Language
T : L.Theory
α : Type w
n : ℕ
h : T.IsMaximal
φ : L.Sentence
hφ : ¬T.IsSatisfiable
con : Formula.not φ ∈ T
⊢ False
state_after: no goals
Theorem: Filter.eventually_lt_of_lt_liminf
File: Mathlib/Order/LiminfLimsup.lean

tactic: obtain ⟨c, hc, hbc⟩ : ∃ (c : β) (_ : c ∈ { c : β | ∀ᶠ n : α in f, c ≤ u n }), b < c := by
  simp_rw [exists_prop]
  exact exists_lt_of_lt_csSup hu h
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
f : Filter α
inst✝ : ConditionallyCompleteLinearOrder β
u : α → β
b : β
h : b < liminf u f
hu : autoParam (IsBoundedUnder (fun x x_1 => x ≥ x_1) f u) _auto✝
⊢ ∀ᶠ (a : α) in f, b < u a
state_after: case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
f : Filter α
inst✝ : ConditionallyCompleteLinearOrder β
u : α → β
b : β
h : b < liminf u f
hu : autoParam (IsBoundedUnder (fun x x_1 => x ≥ x_1) f u) _auto✝
c : β
hc : c ∈ {c | ∀ᶠ (n : α) in f, c ≤ u n}
hbc : b < c
⊢ ∀ᶠ (a : α) in f, b < u a

tactic: exact hc.mono fun x hx => lt_of_lt_of_le hbc hx
state_before: case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
f : Filter α
inst✝ : ConditionallyCompleteLinearOrder β
u : α → β
b : β
h : b < liminf u f
hu : autoParam (IsBoundedUnder (fun x x_1 => x ≥ x_1) f u) _auto✝
c : β
hc : c ∈ {c | ∀ᶠ (n : α) in f, c ≤ u n}
hbc : b < c
⊢ ∀ᶠ (a : α) in f, b < u a
state_after: no goals

tactic: simp_rw [exists_prop]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
f : Filter α
inst✝ : ConditionallyCompleteLinearOrder β
u : α → β
b : β
h : b < liminf u f
hu : autoParam (IsBoundedUnder (fun x x_1 => x ≥ x_1) f u) _auto✝
⊢ ∃ c, ∃ (_ : c ∈ {c | ∀ᶠ (n : α) in f, c ≤ u n}), b < c
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
f : Filter α
inst✝ : ConditionallyCompleteLinearOrder β
u : α → β
b : β
h : b < liminf u f
hu : autoParam (IsBoundedUnder (fun x x_1 => x ≥ x_1) f u) _auto✝
⊢ ∃ c ∈ {c | ∀ᶠ (n : α) in f, c ≤ u n}, b < c

tactic: exact exists_lt_of_lt_csSup hu h
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
f : Filter α
inst✝ : ConditionallyCompleteLinearOrder β
u : α → β
b : β
h : b < liminf u f
hu : autoParam (IsBoundedUnder (fun x x_1 => x ≥ x_1) f u) _auto✝
⊢ ∃ c ∈ {c | ∀ᶠ (n : α) in f, c ≤ u n}, b < c
state_after: no goals
Theorem: inv_pos_le_iff_one_le_mul
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: rw [inv_eq_one_div]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
ha : 0 < a
⊢ a⁻¹ ≤ b ↔ 1 ≤ b * a
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
ha : 0 < a
⊢ 1 / a ≤ b ↔ 1 ≤ b * a

tactic: exact div_le_iff ha
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
ha : 0 < a
⊢ 1 / a ≤ b ↔ 1 ≤ b * a
state_after: no goals
Theorem: QuadraticForm.IsOrtho.zero_right
File: Mathlib/LinearAlgebra/QuadraticForm/Basic.lean

tactic: simp [isOrtho_def]
state_before: S : Type u_1
T : Type u_2
R : Type u_3
M : Type u_4
N : Type u_5
inst✝² : CommSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
Q : QuadraticForm R M
x : M
⊢ Q.IsOrtho x 0
state_after: no goals
Theorem: IsUpperSet.interior
File: Mathlib/Topology/Algebra/Order/UpperLower.lean

tactic: rw [← isLowerSet_compl, ← closure_compl]
state_before: α : Type u_1
inst✝² : TopologicalSpace α
inst✝¹ : Preorder α
inst✝ : HasUpperLowerClosure α
s : Set α
h : IsUpperSet s
⊢ IsUpperSet (interior s)
state_after: α : Type u_1
inst✝² : TopologicalSpace α
inst✝¹ : Preorder α
inst✝ : HasUpperLowerClosure α
s : Set α
h : IsUpperSet s
⊢ IsLowerSet (closure sᶜ)

tactic: exact h.compl.closure
state_before: α : Type u_1
inst✝² : TopologicalSpace α
inst✝¹ : Preorder α
inst✝ : HasUpperLowerClosure α
s : Set α
h : IsUpperSet s
⊢ IsLowerSet (closure sᶜ)
state_after: no goals
Theorem: EulerProduct.norm_tsum_smoothNumbers_sub_tsum_lt
File: Mathlib/NumberTheory/EulerProduct/Basic.lean

tactic: conv => enter [1, N₀, N]; rw [smoothNumbers_eq_factoredNumbers]
state_before: R : Type u_1
inst✝¹ : NormedCommRing R
inst✝ : CompleteSpace R
f : ℕ → R
hf₁ : f 1 = 1
hmul : ∀ {m n : ℕ}, m.Coprime n → f (m * n) = f m * f n
hsum : Summable f
hf₀ : f 0 = 0
ε : ℝ
εpos : 0 < ε
⊢ ∃ N₀, ∀ N ≥ N₀, ‖∑' (m : ℕ), f m - ∑' (m : ↑N.smoothNumbers), f ↑m‖ < ε
state_after: R : Type u_1
inst✝¹ : NormedCommRing R
inst✝ : CompleteSpace R
f : ℕ → R
hf₁ : f 1 = 1
hmul : ∀ {m n : ℕ}, m.Coprime n → f (m * n) = f m * f n
hsum : Summable f
hf₀ : f 0 = 0
ε : ℝ
εpos : 0 < ε
⊢ ∃ N₀, ∀ N ≥ N₀, ‖∑' (m : ℕ), f m - ∑' (m : ↑(factoredNumbers (range N))), f ↑m‖ < ε

tactic: obtain ⟨N₀, hN₀⟩ := norm_tsum_factoredNumbers_sub_tsum_lt hsum hf₀ εpos
state_before: R : Type u_1
inst✝¹ : NormedCommRing R
inst✝ : CompleteSpace R
f : ℕ → R
hf₁ : f 1 = 1
hmul : ∀ {m n : ℕ}, m.Coprime n → f (m * n) = f m * f n
hsum : Summable f
hf₀ : f 0 = 0
ε : ℝ
εpos : 0 < ε
⊢ ∃ N₀, ∀ N ≥ N₀, ‖∑' (m : ℕ), f m - ∑' (m : ↑(factoredNumbers (range N))), f ↑m‖ < ε
state_after: case intro
R : Type u_1
inst✝¹ : NormedCommRing R
inst✝ : CompleteSpace R
f : ℕ → R
hf₁ : f 1 = 1
hmul : ∀ {m n : ℕ}, m.Coprime n → f (m * n) = f m * f n
hsum : Summable f
hf₀ : f 0 = 0
ε : ℝ
εpos : 0 < ε
N₀ : ℕ
hN₀ : ∀ (s : Finset ℕ), N₀.primesBelow ≤ s → ‖∑' (m : ℕ), f m - ∑' (m : ↑(factoredNumbers s)), f ↑m‖ < ε
⊢ ∃ N₀, ∀ N ≥ N₀, ‖∑' (m : ℕ), f m - ∑' (m : ↑(factoredNumbers (range N))), f ↑m‖ < ε

tactic: refine ⟨N₀, fun N hN ↦ hN₀ (range N) fun p hp ↦ ?_⟩
state_before: case intro
R : Type u_1
inst✝¹ : NormedCommRing R
inst✝ : CompleteSpace R
f : ℕ → R
hf₁ : f 1 = 1
hmul : ∀ {m n : ℕ}, m.Coprime n → f (m * n) = f m * f n
hsum : Summable f
hf₀ : f 0 = 0
ε : ℝ
εpos : 0 < ε
N₀ : ℕ
hN₀ : ∀ (s : Finset ℕ), N₀.primesBelow ≤ s → ‖∑' (m : ℕ), f m - ∑' (m : ↑(factoredNumbers s)), f ↑m‖ < ε
⊢ ∃ N₀, ∀ N ≥ N₀, ‖∑' (m : ℕ), f m - ∑' (m : ↑(factoredNumbers (range N))), f ↑m‖ < ε
state_after: case intro
R : Type u_1
inst✝¹ : NormedCommRing R
inst✝ : CompleteSpace R
f : ℕ → R
hf₁ : f 1 = 1
hmul : ∀ {m n : ℕ}, m.Coprime n → f (m * n) = f m * f n
hsum : Summable f
hf₀ : f 0 = 0
ε : ℝ
εpos : 0 < ε
N₀ : ℕ
hN₀ : ∀ (s : Finset ℕ), N₀.primesBelow ≤ s → ‖∑' (m : ℕ), f m - ∑' (m : ↑(factoredNumbers s)), f ↑m‖ < ε
N : ℕ
hN : N ≥ N₀
p : ℕ
hp : p ∈ N₀.primesBelow
⊢ p ∈ range N

tactic: exact mem_range.mpr <| (lt_of_mem_primesBelow hp).trans_le hN
state_before: case intro
R : Type u_1
inst✝¹ : NormedCommRing R
inst✝ : CompleteSpace R
f : ℕ → R
hf₁ : f 1 = 1
hmul : ∀ {m n : ℕ}, m.Coprime n → f (m * n) = f m * f n
hsum : Summable f
hf₀ : f 0 = 0
ε : ℝ
εpos : 0 < ε
N₀ : ℕ
hN₀ : ∀ (s : Finset ℕ), N₀.primesBelow ≤ s → ‖∑' (m : ℕ), f m - ∑' (m : ↑(factoredNumbers s)), f ↑m‖ < ε
N : ℕ
hN : N ≥ N₀
p : ℕ
hp : p ∈ N₀.primesBelow
⊢ p ∈ range N
state_after: no goals
Theorem: Nat.Ico_insert_succ_left
File: Mathlib/Order/Interval/Finset/Nat.lean

tactic: rw [Ico_succ_left, ← Ioo_insert_left h]
state_before: a b c : ℕ
h : a < b
⊢ insert a (Ico a.succ b) = Ico a b
state_after: no goals
Theorem: MeasureTheory.Measure.IicSnd_apply
File: Mathlib/Probability/Kernel/Disintegration/CondCdf.lean

tactic: rw [IicSnd, fst_apply hs,
  restrict_apply' (MeasurableSet.univ.prod (measurableSet_Iic : MeasurableSet (Iic r))), ←
  prod_univ, prod_inter_prod, inter_univ, univ_inter]
state_before: α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
r : ℝ
s : Set α
hs : MeasurableSet s
⊢ (ρ.IicSnd r) s = ρ (s ×ˢ Iic r)
state_after: no goals
Theorem: NNReal.lt_iff_exists_rat_btwn
File: Mathlib/Data/NNReal/Basic.lean

tactic: simp [Real.coe_toNNReal _ this, NNReal.coe_lt_coe.symm, haq, hqb]
state_before: r r₁ r₂ : ℝ≥0
x y : ℝ
a b : ℝ≥0
h : ↑a < ↑b
q : ℚ
haq : ↑a < ↑q
hqb : ↑q < ↑b
this : 0 ≤ ↑q
⊢ a < (↑q).toNNReal ∧ (↑q).toNNReal < b
state_after: no goals
Theorem: TopologicalSpace.isTopologicalBasis_of_isOpen_of_nhds
File: Mathlib/Topology/Bases.lean

tactic: simpa [and_assoc] using h_nhds a
state_before: α : Type u
β : Type u_1
t : TopologicalSpace α
B : Set (Set α)
s✝ : Set α
s : Set (Set α)
h_open : ∀ u ∈ s, IsOpen u
h_nhds : ∀ (a : α) (u : Set α), a ∈ u → IsOpen u → ∃ v ∈ s, a ∈ v ∧ v ⊆ u
a : α
⊢ ∀ (i : Set α), a ∈ i ∧ IsOpen i → ∃ i', (i' ∈ s ∧ a ∈ i') ∧ id i' ⊆ i
state_after: no goals
Theorem: TopologicalSpace.Opens.functor_obj_map_obj
File: Mathlib/Topology/Category/TopCat/Opens.lean

tactic: ext
state_before: X Y : TopCat
f : X ⟶ Y
hf : IsOpenMap ⇑f
U : Opens ↑Y
⊢ hf.functor.obj ((map f).obj U) = hf.functor.obj ⊤ ⊓ U
state_after: case h.h
X Y : TopCat
f : X ⟶ Y
hf : IsOpenMap ⇑f
U : Opens ↑Y
x✝ : ↑Y
⊢ x✝ ∈ ↑(hf.functor.obj ((map f).obj U)) ↔ x✝ ∈ ↑(hf.functor.obj ⊤ ⊓ U)

tactic: constructor
state_before: case h.h
X Y : TopCat
f : X ⟶ Y
hf : IsOpenMap ⇑f
U : Opens ↑Y
x✝ : ↑Y
⊢ x✝ ∈ ↑(hf.functor.obj ((map f).obj U)) ↔ x✝ ∈ ↑(hf.functor.obj ⊤ ⊓ U)
state_after: case h.h.mp
X Y : TopCat
f : X ⟶ Y
hf : IsOpenMap ⇑f
U : Opens ↑Y
x✝ : ↑Y
⊢ x✝ ∈ ↑(hf.functor.obj ((map f).obj U)) → x✝ ∈ ↑(hf.functor.obj ⊤ ⊓ U)

case h.h.mpr
X Y : TopCat
f : X ⟶ Y
hf : IsOpenMap ⇑f
U : Opens ↑Y
x✝ : ↑Y
⊢ x✝ ∈ ↑(hf.functor.obj ⊤ ⊓ U) → x✝ ∈ ↑(hf.functor.obj ((map f).obj U))

tactic: rintro ⟨x, hx, rfl⟩
state_before: case h.h.mp
X Y : TopCat
f : X ⟶ Y
hf : IsOpenMap ⇑f
U : Opens ↑Y
x✝ : ↑Y
⊢ x✝ ∈ ↑(hf.functor.obj ((map f).obj U)) → x✝ ∈ ↑(hf.functor.obj ⊤ ⊓ U)
state_after: case h.h.mp.intro.intro
X Y : TopCat
f : X ⟶ Y
hf : IsOpenMap ⇑f
U : Opens ↑Y
x : ↑X
hx : x ∈ ↑((map f).obj U)
⊢ f x ∈ ↑(hf.functor.obj ⊤ ⊓ U)

tactic: exact ⟨⟨x, trivial, rfl⟩, hx⟩
state_before: case h.h.mp.intro.intro
X Y : TopCat
f : X ⟶ Y
hf : IsOpenMap ⇑f
U : Opens ↑Y
x : ↑X
hx : x ∈ ↑((map f).obj U)
⊢ f x ∈ ↑(hf.functor.obj ⊤ ⊓ U)
state_after: no goals

tactic: rintro ⟨⟨x, -, rfl⟩, hx⟩
state_before: case h.h.mpr
X Y : TopCat
f : X ⟶ Y
hf : IsOpenMap ⇑f
U : Opens ↑Y
x✝ : ↑Y
⊢ x✝ ∈ ↑(hf.functor.obj ⊤ ⊓ U) → x✝ ∈ ↑(hf.functor.obj ((map f).obj U))
state_after: case h.h.mpr.intro.intro.intro
X Y : TopCat
f : X ⟶ Y
hf : IsOpenMap ⇑f
U : Opens ↑Y
x : ↑X
hx : f x ∈ ↑U
⊢ f x ∈ ↑(hf.functor.obj ((map f).obj U))

tactic: exact ⟨x, hx, rfl⟩
state_before: case h.h.mpr.intro.intro.intro
X Y : TopCat
f : X ⟶ Y
hf : IsOpenMap ⇑f
U : Opens ↑Y
x : ↑X
hx : f x ∈ ↑U
⊢ f x ∈ ↑(hf.functor.obj ((map f).obj U))
state_after: no goals
Theorem: Nat.floor_lt_ceil_of_lt_of_pos
File: Mathlib/Algebra/Order/Floor.lean

tactic: rcases le_or_lt 0 a with (ha | ha)
state_before: F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a✝ : α
n : ℕ
a b : α
h : a < b
h' : 0 < b
⊢ ⌊a⌋₊ < ⌈b⌉₊
state_after: case inl
F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a✝ : α
n : ℕ
a b : α
h : a < b
h' : 0 < b
ha : 0 ≤ a
⊢ ⌊a⌋₊ < ⌈b⌉₊

case inr
F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a✝ : α
n : ℕ
a b : α
h : a < b
h' : 0 < b
ha : a < 0
⊢ ⌊a⌋₊ < ⌈b⌉₊

tactic: rw [floor_lt ha]
state_before: case inl
F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a✝ : α
n : ℕ
a b : α
h : a < b
h' : 0 < b
ha : 0 ≤ a
⊢ ⌊a⌋₊ < ⌈b⌉₊
state_after: case inl
F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a✝ : α
n : ℕ
a b : α
h : a < b
h' : 0 < b
ha : 0 ≤ a
⊢ a < ↑⌈b⌉₊

tactic: exact h.trans_le (le_ceil _)
state_before: case inl
F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a✝ : α
n : ℕ
a b : α
h : a < b
h' : 0 < b
ha : 0 ≤ a
⊢ a < ↑⌈b⌉₊
state_after: no goals

tactic: rwa [floor_of_nonpos ha.le, lt_ceil, Nat.cast_zero]
state_before: case inr
F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a✝ : α
n : ℕ
a b : α
h : a < b
h' : 0 < b
ha : a < 0
⊢ ⌊a⌋₊ < ⌈b⌉₊
state_after: no goals
Theorem: Nat.ne_zero_of_mem_divisorsAntidiagonal
File: Mathlib/NumberTheory/Divisors.lean

tactic: obtain ⟨hp₁, hp₂⟩ := Nat.mem_divisorsAntidiagonal.mp hp
state_before: n : ℕ
p : ℕ × ℕ
hp : p ∈ n.divisorsAntidiagonal
⊢ p.1 ≠ 0 ∧ p.2 ≠ 0
state_after: case intro
n : ℕ
p : ℕ × ℕ
hp : p ∈ n.divisorsAntidiagonal
hp₁ : p.1 * p.2 = n
hp₂ : n ≠ 0
⊢ p.1 ≠ 0 ∧ p.2 ≠ 0

tactic: exact mul_ne_zero_iff.mp (hp₁.symm ▸ hp₂)
state_before: case intro
n : ℕ
p : ℕ × ℕ
hp : p ∈ n.divisorsAntidiagonal
hp₁ : p.1 * p.2 = n
hp₂ : n ≠ 0
⊢ p.1 ≠ 0 ∧ p.2 ≠ 0
state_after: no goals
Theorem: Order.succ_le_succ
File: Mathlib/Order/SuccPred/Basic.lean

tactic: by_cases hb : IsMax b
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : SuccOrder α
a b : α
h : a ≤ b
⊢ succ a ≤ succ b
state_after: case pos
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : SuccOrder α
a b : α
h : a ≤ b
hb : IsMax b
⊢ succ a ≤ succ b

case neg
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : SuccOrder α
a b : α
h : a ≤ b
hb : ¬IsMax b
⊢ succ a ≤ succ b

tactic: by_cases hba : b ≤ a
state_before: case pos
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : SuccOrder α
a b : α
h : a ≤ b
hb : IsMax b
⊢ succ a ≤ succ b
state_after: case pos
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : SuccOrder α
a b : α
h : a ≤ b
hb : IsMax b
hba : b ≤ a
⊢ succ a ≤ succ b

case neg
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : SuccOrder α
a b : α
h : a ≤ b
hb : IsMax b
hba : ¬b ≤ a
⊢ succ a ≤ succ b

tactic: exact (hb <| hba.trans <| le_succ _).trans (le_succ _)
state_before: case pos
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : SuccOrder α
a b : α
h : a ≤ b
hb : IsMax b
hba : b ≤ a
⊢ succ a ≤ succ b
state_after: no goals

tactic: exact succ_le_of_lt ((h.lt_of_not_le hba).trans_le <| le_succ b)
state_before: case neg
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : SuccOrder α
a b : α
h : a ≤ b
hb : IsMax b
hba : ¬b ≤ a
⊢ succ a ≤ succ b
state_after: no goals

tactic: rwa [succ_le_iff_of_not_isMax fun ha => hb <| ha.mono h, lt_succ_iff_of_not_isMax hb]
state_before: case neg
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : SuccOrder α
a b : α
h : a ≤ b
hb : ¬IsMax b
⊢ succ a ≤ succ b
state_after: no goals
Theorem: Polynomial.mul_divByMonic_eq_iff_isRoot
File: Mathlib/Algebra/Polynomial/Div.lean

tactic: rw [← h, eval_mul, eval_sub, eval_X, eval_C, sub_self, zero_mul]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : CommRing R
p q : R[X]
h : (X - C a) * (p /ₘ (X - C a)) = p
⊢ eval a p = 0
state_after: no goals

tactic: conv_rhs =>
  rw [← modByMonic_add_div p (monic_X_sub_C a)]
  rw [modByMonic_X_sub_C_eq_C_eval, h, C_0, zero_add]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : CommRing R
p q : R[X]
h : eval a p = 0
⊢ (X - C a) * (p /ₘ (X - C a)) = p
state_after: no goals
Theorem: Finset.uIcc_of_le
File: Mathlib/Order/Interval/Finset/Basic.lean

tactic: rw [uIcc, inf_eq_left.2 h, sup_eq_right.2 h]
state_before: ι : Type u_1
α : Type u_2
inst✝¹ : Lattice α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
h : a ≤ b
⊢ [[a, b]] = Icc a b
state_after: no goals
Theorem: StrongConcaveOn.strictConcaveOn
File: Mathlib/Analysis/Convex/Strong.lean

tactic: positivity
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
φ ψ : ℝ → ℝ
s✝ : Set E
a b m✝ : ℝ
x y : E
f✝ g : E → ℝ
s : Set E
f : E → ℝ
m n : ℝ
hf : StrongConcaveOn s m f
hm : 0 < m
r : ℝ
hr : r ≠ 0
⊢ 0 < m / 2 * r ^ 2
state_after: no goals
Theorem: PiNat.apply_eq_of_dist_lt
File: Mathlib/Topology/MetricSpace/PiNat.lean

tactic: rcases eq_or_ne x y with (rfl | hne)
state_before: E : ℕ → Type u_1
x y : (n : ℕ) → E n
n : ℕ
h : dist x y < (1 / 2) ^ n
i : ℕ
hi : i ≤ n
⊢ x i = y i
state_after: case inl
E : ℕ → Type u_1
x : (n : ℕ) → E n
n i : ℕ
hi : i ≤ n
h : dist x x < (1 / 2) ^ n
⊢ x i = x i

case inr
E : ℕ → Type u_1
x y : (n : ℕ) → E n
n : ℕ
h : dist x y < (1 / 2) ^ n
i : ℕ
hi : i ≤ n
hne : x ≠ y
⊢ x i = y i

tactic: have : n < firstDiff x y := by
  simpa [dist_eq_of_ne hne, inv_lt_inv, pow_lt_pow_iff_right, one_lt_two] using h
state_before: case inr
E : ℕ → Type u_1
x y : (n : ℕ) → E n
n : ℕ
h : dist x y < (1 / 2) ^ n
i : ℕ
hi : i ≤ n
hne : x ≠ y
⊢ x i = y i
state_after: case inr
E : ℕ → Type u_1
x y : (n : ℕ) → E n
n : ℕ
h : dist x y < (1 / 2) ^ n
i : ℕ
hi : i ≤ n
hne : x ≠ y
this : n < firstDiff x y
⊢ x i = y i

tactic: exact apply_eq_of_lt_firstDiff (hi.trans_lt this)
state_before: case inr
E : ℕ → Type u_1
x y : (n : ℕ) → E n
n : ℕ
h : dist x y < (1 / 2) ^ n
i : ℕ
hi : i ≤ n
hne : x ≠ y
this : n < firstDiff x y
⊢ x i = y i
state_after: no goals

tactic: rfl
state_before: case inl
E : ℕ → Type u_1
x : (n : ℕ) → E n
n i : ℕ
hi : i ≤ n
h : dist x x < (1 / 2) ^ n
⊢ x i = x i
state_after: no goals

tactic: simpa [dist_eq_of_ne hne, inv_lt_inv, pow_lt_pow_iff_right, one_lt_two] using h
state_before: E : ℕ → Type u_1
x y : (n : ℕ) → E n
n : ℕ
h : dist x y < (1 / 2) ^ n
i : ℕ
hi : i ≤ n
hne : x ≠ y
⊢ n < firstDiff x y
state_after: no goals