1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: ConcaveOn.le_slope_of_hasDerivWithinAt
File: Mathlib/Analysis/Convex/Deriv.lean

tactic: refine hfc.le_slope_of_hasDerivWithinAt_Iio hx hy hxy (hf'.mono_of_mem ?_)
state_before: S : Set ℝ
f : ℝ → ℝ
x y f' : ℝ
hfc : ConcaveOn ℝ S f
hx : x ∈ S
hy : y ∈ S
hxy : x < y
hf' : HasDerivWithinAt f f' S y
⊢ f' ≤ slope f x y
state_after: S : Set ℝ
f : ℝ → ℝ
x y f' : ℝ
hfc : ConcaveOn ℝ S f
hx : x ∈ S
hy : y ∈ S
hxy : x < y
hf' : HasDerivWithinAt f f' S y
⊢ S ∈ 𝓝[<] y

tactic: rw [mem_nhdsWithin_Iio_iff_exists_Ico_subset]
state_before: S : Set ℝ
f : ℝ → ℝ
x y f' : ℝ
hfc : ConcaveOn ℝ S f
hx : x ∈ S
hy : y ∈ S
hxy : x < y
hf' : HasDerivWithinAt f f' S y
⊢ S ∈ 𝓝[<] y
state_after: S : Set ℝ
f : ℝ → ℝ
x y f' : ℝ
hfc : ConcaveOn ℝ S f
hx : x ∈ S
hy : y ∈ S
hxy : x < y
hf' : HasDerivWithinAt f f' S y
⊢ ∃ l ∈ Iio y, Ico l y ⊆ S

tactic: exact ⟨x, hxy, Ico_subset_Icc_self.trans (hfc.1.ordConnected.out hx hy)⟩
state_before: S : Set ℝ
f : ℝ → ℝ
x y f' : ℝ
hfc : ConcaveOn ℝ S f
hx : x ∈ S
hy : y ∈ S
hxy : x < y
hf' : HasDerivWithinAt f f' S y
⊢ ∃ l ∈ Iio y, Ico l y ⊆ S
state_after: no goals
Theorem: PSet.equiv_of_isEmpty
File: Mathlib/SetTheory/ZFC/Basic.lean

tactic: simp
state_before: x : PSet
y : PSet
inst✝¹ : IsEmpty x.Type
inst✝ : IsEmpty y.Type
⊢ (∀ (i : x.Type), ∃ j, (x.Func i).Equiv (y.Func j)) ∧ ∀ (j : y.Type), ∃ i, (x.Func i).Equiv (y.Func j)
state_after: no goals
Theorem: ENNReal.ofReal_rpow_of_nonneg
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

tactic: by_cases hp0 : p = 0
state_before: x p : ℝ
hx_nonneg : 0 ≤ x
hp_nonneg : 0 ≤ p
⊢ ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)
state_after: case pos
x p : ℝ
hx_nonneg : 0 ≤ x
hp_nonneg : 0 ≤ p
hp0 : p = 0
⊢ ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)

case neg
x p : ℝ
hx_nonneg : 0 ≤ x
hp_nonneg : 0 ≤ p
hp0 : ¬p = 0
⊢ ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)

tactic: by_cases hx0 : x = 0
state_before: case neg
x p : ℝ
hx_nonneg : 0 ≤ x
hp_nonneg : 0 ≤ p
hp0 : ¬p = 0
⊢ ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)
state_after: case pos
x p : ℝ
hx_nonneg : 0 ≤ x
hp_nonneg : 0 ≤ p
hp0 : ¬p = 0
hx0 : x = 0
⊢ ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)

case neg
x p : ℝ
hx_nonneg : 0 ≤ x
hp_nonneg : 0 ≤ p
hp0 : ¬p = 0
hx0 : ¬x = 0
⊢ ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)

tactic: rw [← Ne] at hx0
state_before: case neg
x p : ℝ
hx_nonneg : 0 ≤ x
hp_nonneg : 0 ≤ p
hp0 : ¬p = 0
hx0 : ¬x = 0
⊢ ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)
state_after: case neg
x p : ℝ
hx_nonneg : 0 ≤ x
hp_nonneg : 0 ≤ p
hp0 : ¬p = 0
hx0 : x ≠ 0
⊢ ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)

tactic: exact ofReal_rpow_of_pos (hx_nonneg.lt_of_ne hx0.symm)
state_before: case neg
x p : ℝ
hx_nonneg : 0 ≤ x
hp_nonneg : 0 ≤ p
hp0 : ¬p = 0
hx0 : x ≠ 0
⊢ ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)
state_after: no goals

tactic: simp [hp0]
state_before: case pos
x p : ℝ
hx_nonneg : 0 ≤ x
hp_nonneg : 0 ≤ p
hp0 : p = 0
⊢ ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)
state_after: no goals

tactic: rw [← Ne] at hp0
state_before: case pos
x p : ℝ
hx_nonneg : 0 ≤ x
hp_nonneg : 0 ≤ p
hp0 : ¬p = 0
hx0 : x = 0
⊢ ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)
state_after: case pos
x p : ℝ
hx_nonneg : 0 ≤ x
hp_nonneg : 0 ≤ p
hp0 : p ≠ 0
hx0 : x = 0
⊢ ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)

tactic: have hp_pos : 0 < p := lt_of_le_of_ne hp_nonneg hp0.symm
state_before: case pos
x p : ℝ
hx_nonneg : 0 ≤ x
hp_nonneg : 0 ≤ p
hp0 : p ≠ 0
hx0 : x = 0
⊢ ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)
state_after: case pos
x p : ℝ
hx_nonneg : 0 ≤ x
hp_nonneg : 0 ≤ p
hp0 : p ≠ 0
hx0 : x = 0
hp_pos : 0 < p
⊢ ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)

tactic: simp [hx0, hp_pos, hp_pos.ne.symm]
state_before: case pos
x p : ℝ
hx_nonneg : 0 ≤ x
hp_nonneg : 0 ≤ p
hp0 : p ≠ 0
hx0 : x = 0
hp_pos : 0 < p
⊢ ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)
state_after: no goals
Theorem: Real.arctan_neg
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Arctan.lean

tactic: simp [arctan_eq_arcsin, neg_div]
state_before: x : ℝ
⊢ arctan (-x) = -arctan x
state_after: no goals
Theorem: Fin.cycleRange_zero
File: Mathlib/GroupTheory/Perm/Fin.lean

tactic: ext j
state_before: n : ℕ
⊢ cycleRange 0 = 1
state_after: case H.h
n : ℕ
j : Fin n.succ
⊢ ↑((cycleRange 0) j) = ↑(1 j)

tactic: refine Fin.cases ?_ (fun j => ?_) j
state_before: case H.h
n : ℕ
j : Fin n.succ
⊢ ↑((cycleRange 0) j) = ↑(1 j)
state_after: case H.h.refine_1
n : ℕ
j : Fin n.succ
⊢ ↑((cycleRange 0) 0) = ↑(1 0)

case H.h.refine_2
n : ℕ
j✝ : Fin n.succ
j : Fin n
⊢ ↑((cycleRange 0) j.succ) = ↑(1 j.succ)

tactic: simp
state_before: case H.h.refine_1
n : ℕ
j : Fin n.succ
⊢ ↑((cycleRange 0) 0) = ↑(1 0)
state_after: no goals

tactic: rw [cycleRange_of_gt (Fin.succ_pos j), one_apply]
state_before: case H.h.refine_2
n : ℕ
j✝ : Fin n.succ
j : Fin n
⊢ ↑((cycleRange 0) j.succ) = ↑(1 j.succ)
state_after: no goals
Theorem: Ordinal.mem_closure_iff_sup
File: Mathlib/SetTheory/Ordinal/Topology.lean

tactic: simp only [exists_prop]
state_before: s : Set Ordinal.{u}
a : Ordinal.{u}
⊢ (∃ ι, Nonempty ι ∧ ∃ f, (∀ (i : ι), f i ∈ s) ∧ sup f = a) ↔
    ∃ ι, ∃ (_ : Nonempty ι), ∃ f, (∀ (i : ι), f i ∈ s) ∧ sup f = a
state_after: no goals
Theorem: CategoryTheory.IsIso.of_isIso_fac_left
File: Mathlib/CategoryTheory/Iso.lean

tactic: rw [← w] at hh
state_before: C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ Z✝ : C
f✝ g✝ : X✝ ⟶ Y✝
h✝ : Y✝ ⟶ Z✝
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
h : X ⟶ Z
inst✝ : IsIso f
hh : IsIso h
w : f ≫ g = h
⊢ IsIso g
state_after: C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ Z✝ : C
f✝ g✝ : X✝ ⟶ Y✝
h✝ : Y✝ ⟶ Z✝
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
h : X ⟶ Z
inst✝ : IsIso f
hh : IsIso (f ≫ g)
w : f ≫ g = h
⊢ IsIso g

tactic: haveI := hh
state_before: C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ Z✝ : C
f✝ g✝ : X✝ ⟶ Y✝
h✝ : Y✝ ⟶ Z✝
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
h : X ⟶ Z
inst✝ : IsIso f
hh : IsIso (f ≫ g)
w : f ≫ g = h
⊢ IsIso g
state_after: C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ Z✝ : C
f✝ g✝ : X✝ ⟶ Y✝
h✝ : Y✝ ⟶ Z✝
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
h : X ⟶ Z
inst✝ : IsIso f
hh : IsIso (f ≫ g)
w : f ≫ g = h
this : IsIso (f ≫ g)
⊢ IsIso g

tactic: exact of_isIso_comp_left f g
state_before: C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ Z✝ : C
f✝ g✝ : X✝ ⟶ Y✝
h✝ : Y✝ ⟶ Z✝
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
h : X ⟶ Z
inst✝ : IsIso f
hh : IsIso (f ≫ g)
w : f ≫ g = h
this : IsIso (f ≫ g)
⊢ IsIso g
state_after: no goals
Theorem: schnirelmannDensity_setOf_even
File: Mathlib/Combinatorics/Schnirelmann.lean

tactic: simp
state_before: ⊢ 1 ∉ setOf Even
state_after: no goals
Theorem: Nat.head!_digits
File: Mathlib/Data/Nat/Digits.lean

tactic: by_cases hb : 1 < b
state_before: n✝ b n : ℕ
h : b ≠ 1
⊢ (b.digits n).head! = n % b
state_after: case pos
n✝ b n : ℕ
h : b ≠ 1
hb : 1 < b
⊢ (b.digits n).head! = n % b

case neg
n✝ b n : ℕ
h : b ≠ 1
hb : ¬1 < b
⊢ (b.digits n).head! = n % b

tactic: rcases n with _ | n
state_before: case pos
n✝ b n : ℕ
h : b ≠ 1
hb : 1 < b
⊢ (b.digits n).head! = n % b
state_after: case pos.zero
n b : ℕ
h : b ≠ 1
hb : 1 < b
⊢ (b.digits 0).head! = 0 % b

case pos.succ
n✝ b : ℕ
h : b ≠ 1
hb : 1 < b
n : ℕ
⊢ (b.digits (n + 1)).head! = (n + 1) % b

tactic: simp
state_before: case pos.zero
n b : ℕ
h : b ≠ 1
hb : 1 < b
⊢ (b.digits 0).head! = 0 % b
state_after: no goals

tactic: nth_rw 2 [← Nat.ofDigits_digits b (n + 1)]
state_before: case pos.succ
n✝ b : ℕ
h : b ≠ 1
hb : 1 < b
n : ℕ
⊢ (b.digits (n + 1)).head! = (n + 1) % b
state_after: case pos.succ
n✝ b : ℕ
h : b ≠ 1
hb : 1 < b
n : ℕ
⊢ (b.digits (n + 1)).head! = ofDigits b (b.digits (n + 1)) % b

tactic: rw [Nat.ofDigits_mod_eq_head! _ _]
state_before: case pos.succ
n✝ b : ℕ
h : b ≠ 1
hb : 1 < b
n : ℕ
⊢ (b.digits (n + 1)).head! = ofDigits b (b.digits (n + 1)) % b
state_after: case pos.succ
n✝ b : ℕ
h : b ≠ 1
hb : 1 < b
n : ℕ
⊢ (b.digits (n + 1)).head! = (b.digits (n + 1)).head! % b

tactic: exact (Nat.mod_eq_of_lt (Nat.digits_lt_base hb <| List.head!_mem_self <|
    Nat.digits_ne_nil_iff_ne_zero.mpr <| Nat.succ_ne_zero n)).symm
state_before: case pos.succ
n✝ b : ℕ
h : b ≠ 1
hb : 1 < b
n : ℕ
⊢ (b.digits (n + 1)).head! = (b.digits (n + 1)).head! % b
state_after: no goals

tactic: rcases n with _ | _ <;> simp_all [show b = 0 by omega]
state_before: case neg
n✝ b n : ℕ
h : b ≠ 1
hb : ¬1 < b
⊢ (b.digits n).head! = n % b
state_after: no goals

tactic: omega
state_before: n b : ℕ
h : b ≠ 1
hb : ¬1 < b
n✝ : ℕ
⊢ b = 0
state_after: no goals
Theorem: coe_toPrincipalIdeal
File: Mathlib/RingTheory/ClassGroup.lean

tactic: simp only [toPrincipalIdeal]
state_before: R : Type u_1
K : Type u_2
L : Type u_3
inst✝⁹ : CommRing R
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : DecidableEq L
inst✝⁵ : Algebra R K
inst✝⁴ : IsFractionRing R K
inst✝³ : Algebra K L
inst✝² : FiniteDimensional K L
inst✝¹ : Algebra R L
inst✝ : IsScalarTower R K L
x : Kˣ
⊢ ↑((toPrincipalIdeal R K) x) = spanSingleton R⁰ ↑x
state_after: R : Type u_1
K : Type u_2
L : Type u_3
inst✝⁹ : CommRing R
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : DecidableEq L
inst✝⁵ : Algebra R K
inst✝⁴ : IsFractionRing R K
inst✝³ : Algebra K L
inst✝² : FiniteDimensional K L
inst✝¹ : Algebra R L
inst✝ : IsScalarTower R K L
x : Kˣ
⊢ ↑({ toFun := fun x => { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹, val_inv := ⋯, inv_val := ⋯ },
          map_one' := ⋯, map_mul' := ⋯ }
        x) =
    spanSingleton R⁰ ↑x

tactic: rfl
state_before: R : Type u_1
K : Type u_2
L : Type u_3
inst✝⁹ : CommRing R
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : DecidableEq L
inst✝⁵ : Algebra R K
inst✝⁴ : IsFractionRing R K
inst✝³ : Algebra K L
inst✝² : FiniteDimensional K L
inst✝¹ : Algebra R L
inst✝ : IsScalarTower R K L
x : Kˣ
⊢ ↑({ toFun := fun x => { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹, val_inv := ⋯, inv_val := ⋯ },
          map_one' := ⋯, map_mul' := ⋯ }
        x) =
    spanSingleton R⁰ ↑x
state_after: no goals
Theorem: Function.periodicOrbit_apply_iterate_eq
File: Mathlib/Dynamics/PeriodicPts.lean

tactic: simp [minimalPeriod_apply_iterate hx]
state_before: α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m n✝ : ℕ
hx : x ∈ periodicPts f
n : ℕ
⊢ ((List.map (fun n => f^[n] x) (List.range (minimalPeriod f x))).rotate n).length =
    (List.map (fun n_1 => f^[n_1] (f^[n] x)) (List.range (minimalPeriod f (f^[n] x)))).length
state_after: no goals

tactic: simp [List.getElem_rotate, iterate_add_apply]
state_before: α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m✝ n✝ : ℕ
hx : x ∈ periodicPts f
n m : ℕ
x✝¹ : m < ((List.map (fun n => f^[n] x) (List.range (minimalPeriod f x))).rotate n).length
x✝ : m < (List.map (fun n_1 => f^[n_1] (f^[n] x)) (List.range (minimalPeriod f (f^[n] x)))).length
⊢ ((List.map (fun n => f^[n] x) (List.range (minimalPeriod f x))).rotate n).get ⟨m, x✝¹⟩ =
    (List.map (fun n_1 => f^[n_1] (f^[n] x)) (List.range (minimalPeriod f (f^[n] x)))).get ⟨m, x✝⟩
state_after: no goals
Theorem: Complementeds.coe_le_coe
File: Mathlib/Order/Disjoint.lean

tactic: simp
state_before: α : Type u_1
inst✝¹ : Lattice α
inst✝ : BoundedOrder α
a b : Complementeds α
⊢ ↑a ≤ ↑b ↔ a ≤ b
state_after: no goals
Theorem: IsNilpotent.pow_of_pos
File: Mathlib/RingTheory/Nilpotent/Defs.lean

tactic: cases n with
| zero => contradiction
| succ => exact  IsNilpotent.pow_succ _ hx
state_before: R : Type u_1
S✝ : Type u_2
x✝ y : R
n : ℕ
S : Type u_3
inst✝ : MonoidWithZero S
x : S
hx : IsNilpotent x
hn : n ≠ 0
⊢ IsNilpotent (x ^ n)
state_after: no goals

tactic: contradiction
state_before: case zero
R : Type u_1
S✝ : Type u_2
x✝ y : R
S : Type u_3
inst✝ : MonoidWithZero S
x : S
hx : IsNilpotent x
hn : 0 ≠ 0
⊢ IsNilpotent (x ^ 0)
state_after: no goals

tactic: exact  IsNilpotent.pow_succ _ hx
state_before: case succ
R : Type u_1
S✝ : Type u_2
x✝ y : R
S : Type u_3
inst✝ : MonoidWithZero S
x : S
hx : IsNilpotent x
n✝ : ℕ
hn : n✝ + 1 ≠ 0
⊢ IsNilpotent (x ^ (n✝ + 1))
state_after: no goals
Theorem: IntermediateField.toSubalgebra_eq_iff
File: Mathlib/FieldTheory/IntermediateField.lean

tactic: rw [SetLike.ext_iff, SetLike.ext'_iff, Set.ext_iff]
state_before: K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S F E : IntermediateField K L
⊢ F.toSubalgebra = E.toSubalgebra ↔ F = E
state_after: K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S F E : IntermediateField K L
⊢ (∀ (x : L), x ∈ F.toSubalgebra ↔ x ∈ E.toSubalgebra) ↔ ∀ (x : L), x ∈ ↑F ↔ x ∈ ↑E

tactic: rfl
state_before: K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S F E : IntermediateField K L
⊢ (∀ (x : L), x ∈ F.toSubalgebra ↔ x ∈ E.toSubalgebra) ↔ ∀ (x : L), x ∈ ↑F ↔ x ∈ ↑E
state_after: no goals
Theorem: Subring.mem_iSup_of_directed
File: Mathlib/Algebra/Ring/Subring/Basic.lean

tactic: refine ⟨?_, fun ⟨i, hi⟩ ↦ le_iSup S i hi⟩
state_before: R : Type u
S✝ : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S✝
inst✝ : Ring T
ι : Sort u_1
hι : Nonempty ι
S : ι → Subring R
hS : Directed (fun x x_1 => x ≤ x_1) S
x : R
⊢ x ∈ ⨆ i, S i ↔ ∃ i, x ∈ S i
state_after: R : Type u
S✝ : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S✝
inst✝ : Ring T
ι : Sort u_1
hι : Nonempty ι
S : ι → Subring R
hS : Directed (fun x x_1 => x ≤ x_1) S
x : R
⊢ x ∈ ⨆ i, S i → ∃ i, x ∈ S i

tactic: let U : Subring R :=
  Subring.mk' (⋃ i, (S i : Set R)) (⨆ i, (S i).toSubmonoid) (⨆ i, (S i).toAddSubgroup)
    (Submonoid.coe_iSup_of_directed hS) (AddSubgroup.coe_iSup_of_directed hS)
state_before: R : Type u
S✝ : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S✝
inst✝ : Ring T
ι : Sort u_1
hι : Nonempty ι
S : ι → Subring R
hS : Directed (fun x x_1 => x ≤ x_1) S
x : R
⊢ x ∈ ⨆ i, S i → ∃ i, x ∈ S i
state_after: R : Type u
S✝ : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S✝
inst✝ : Ring T
ι : Sort u_1
hι : Nonempty ι
S : ι → Subring R
hS : Directed (fun x x_1 => x ≤ x_1) S
x : R
U : Subring R := Subring.mk' (⋃ i, ↑(S i)) (⨆ i, (S i).toSubmonoid) (⨆ i, (S i).toAddSubgroup) ⋯ ⋯
⊢ x ∈ ⨆ i, S i → ∃ i, x ∈ S i

tactic: suffices ⨆ i, S i ≤ U by simpa [U] using @this x
state_before: R : Type u
S✝ : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S✝
inst✝ : Ring T
ι : Sort u_1
hι : Nonempty ι
S : ι → Subring R
hS : Directed (fun x x_1 => x ≤ x_1) S
x : R
U : Subring R := Subring.mk' (⋃ i, ↑(S i)) (⨆ i, (S i).toSubmonoid) (⨆ i, (S i).toAddSubgroup) ⋯ ⋯
⊢ x ∈ ⨆ i, S i → ∃ i, x ∈ S i
state_after: R : Type u
S✝ : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S✝
inst✝ : Ring T
ι : Sort u_1
hι : Nonempty ι
S : ι → Subring R
hS : Directed (fun x x_1 => x ≤ x_1) S
x : R
U : Subring R := Subring.mk' (⋃ i, ↑(S i)) (⨆ i, (S i).toSubmonoid) (⨆ i, (S i).toAddSubgroup) ⋯ ⋯
⊢ ⨆ i, S i ≤ U

tactic: exact iSup_le fun i x hx ↦ Set.mem_iUnion.2 ⟨i, hx⟩
state_before: R : Type u
S✝ : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S✝
inst✝ : Ring T
ι : Sort u_1
hι : Nonempty ι
S : ι → Subring R
hS : Directed (fun x x_1 => x ≤ x_1) S
x : R
U : Subring R := Subring.mk' (⋃ i, ↑(S i)) (⨆ i, (S i).toSubmonoid) (⨆ i, (S i).toAddSubgroup) ⋯ ⋯
⊢ ⨆ i, S i ≤ U
state_after: no goals

tactic: simpa [U] using @this x
state_before: R : Type u
S✝ : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S✝
inst✝ : Ring T
ι : Sort u_1
hι : Nonempty ι
S : ι → Subring R
hS : Directed (fun x x_1 => x ≤ x_1) S
x : R
U : Subring R := Subring.mk' (⋃ i, ↑(S i)) (⨆ i, (S i).toSubmonoid) (⨆ i, (S i).toAddSubgroup) ⋯ ⋯
this : ⨆ i, S i ≤ U
⊢ x ∈ ⨆ i, S i → ∃ i, x ∈ S i
state_after: no goals
Theorem: PartENat.add_one_le_of_lt
File: Mathlib/Data/Nat/PartENat.lean

tactic: induction' y using PartENat.casesOn with n
state_before: x y : PartENat
h : x < y
⊢ x + 1 ≤ y
state_after: case a
x : PartENat
h : x < ⊤
⊢ x + 1 ≤ ⊤

case a
x : PartENat
n : ℕ
h : x < ↑n
⊢ x + 1 ≤ ↑n

tactic: rcases ne_top_iff.mp (ne_top_of_lt h) with ⟨m, rfl⟩
state_before: case a
x : PartENat
n : ℕ
h : x < ↑n
⊢ x + 1 ≤ ↑n
state_after: case a.intro
n m : ℕ
h : ↑m < ↑n
⊢ ↑m + 1 ≤ ↑n

tactic: norm_cast
state_before: case a.intro
n m : ℕ
h : ↑m < ↑n
⊢ ↑m + 1 ≤ ↑n
state_after: case a.intro
n m : ℕ
h : ↑m < ↑n
⊢ m + 1 ≤ n

tactic: apply Nat.succ_le_of_lt
state_before: case a.intro
n m : ℕ
h : ↑m < ↑n
⊢ m + 1 ≤ n
state_after: case a.intro.h
n m : ℕ
h : ↑m < ↑n
⊢ m < n

tactic: norm_cast at h
state_before: case a.intro.h
n m : ℕ
h : ↑m < ↑n
⊢ m < n
state_after: no goals

tactic: apply le_top
state_before: case a
x : PartENat
h : x < ⊤
⊢ x + 1 ≤ ⊤
state_after: no goals
Theorem: UpperHalfPlane.dist_eq_iff_eq_sq_sinh
File: Mathlib/Analysis/Complex/UpperHalfPlane/Metric.lean

tactic: rw [dist_eq_iff_eq_sinh, ← sq_eq_sq, div_pow, mul_pow, sq_sqrt, mul_assoc]
state_before: z w : ℍ
r R : ℝ
hr : 0 ≤ r
⊢ dist z w = r ↔ dist ↑z ↑w ^ 2 / (4 * z.im * w.im) = sinh (r / 2) ^ 2
state_after: z w : ℍ
r R : ℝ
hr : 0 ≤ r
⊢ dist ↑z ↑w ^ 2 / (2 ^ 2 * (z.im * w.im)) = sinh (r / 2) ^ 2 ↔ dist ↑z ↑w ^ 2 / (4 * (z.im * w.im)) = sinh (r / 2) ^ 2

z w : ℍ
r R : ℝ
hr : 0 ≤ r
⊢ 0 ≤ z.im * w.im

case ha
z w : ℍ
r R : ℝ
hr : 0 ≤ r
⊢ 0 ≤ dist ↑z ↑w / (2 * √(z.im * w.im))

case hb
z w : ℍ
r R : ℝ
hr : 0 ≤ r
⊢ 0 ≤ sinh (r / 2)

tactic: all_goals positivity
state_before: z w : ℍ
r R : ℝ
hr : 0 ≤ r
⊢ 0 ≤ z.im * w.im

case ha
z w : ℍ
r R : ℝ
hr : 0 ≤ r
⊢ 0 ≤ dist ↑z ↑w / (2 * √(z.im * w.im))

case hb
z w : ℍ
r R : ℝ
hr : 0 ≤ r
⊢ 0 ≤ sinh (r / 2)
state_after: no goals

tactic: norm_num
state_before: z w : ℍ
r R : ℝ
hr : 0 ≤ r
⊢ dist ↑z ↑w ^ 2 / (2 ^ 2 * (z.im * w.im)) = sinh (r / 2) ^ 2 ↔ dist ↑z ↑w ^ 2 / (4 * (z.im * w.im)) = sinh (r / 2) ^ 2
state_after: no goals

tactic: positivity
state_before: case hb
z w : ℍ
r R : ℝ
hr : 0 ≤ r
⊢ 0 ≤ sinh (r / 2)
state_after: no goals
Theorem: MeasureTheory.Measure.fst_apply
File: Mathlib/MeasureTheory/Constructions/Prod/Basic.lean

tactic: rw [fst, Measure.map_apply measurable_fst hs]
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁶ : MeasurableSpace α
inst✝⁵ : MeasurableSpace α'
inst✝⁴ : MeasurableSpace β
inst✝³ : MeasurableSpace β'
inst✝² : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝¹ : NormedAddCommGroup E
inst✝ : SFinite ν
ρ : Measure (α × β)
s : Set α
hs : MeasurableSet s
⊢ ρ.fst s = ρ (Prod.fst ⁻¹' s)
state_after: no goals
Theorem: HahnSeries.support_neg
File: Mathlib/RingTheory/HahnSeries/Addition.lean

tactic: ext
state_before: Γ : Type u_1
R : Type u_2
inst✝¹ : PartialOrder Γ
inst✝ : AddGroup R
x : HahnSeries Γ R
⊢ (-x).support = x.support
state_after: case h
Γ : Type u_1
R : Type u_2
inst✝¹ : PartialOrder Γ
inst✝ : AddGroup R
x : HahnSeries Γ R
x✝ : Γ
⊢ x✝ ∈ (-x).support ↔ x✝ ∈ x.support

tactic: simp
state_before: case h
Γ : Type u_1
R : Type u_2
inst✝¹ : PartialOrder Γ
inst✝ : AddGroup R
x : HahnSeries Γ R
x✝ : Γ
⊢ x✝ ∈ (-x).support ↔ x✝ ∈ x.support
state_after: no goals
Theorem: Set.Finite.closure_sUnion
File: Mathlib/Topology/Basic.lean

tactic: rw [sUnion_eq_biUnion, hS.closure_biUnion]
state_before: X : Type u
Y : Type v
ι : Sort w
α : Type u_1
β : Type u_2
x : X
s s₁ s₂ t : Set X
p p₁ p₂ : X → Prop
inst✝ : TopologicalSpace X
S : Set (Set X)
hS : S.Finite
⊢ closure (⋃₀ S) = ⋃ s ∈ S, closure s
state_after: no goals
Theorem: preimage_nhds_coinduced
File: Mathlib/Topology/Order.lean

tactic: letI := TopologicalSpace.coinduced π ‹_›
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : TopologicalSpace α
π : α → β
s : Set β
a : α
hs : s ∈ 𝓝 (π a)
⊢ π ⁻¹' s ∈ 𝓝 a
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : TopologicalSpace α
π : α → β
s : Set β
a : α
hs : s ∈ 𝓝 (π a)
this : TopologicalSpace β := TopologicalSpace.coinduced π inst✝
⊢ π ⁻¹' s ∈ 𝓝 a

tactic: rcases mem_nhds_iff.mp hs with ⟨V, hVs, V_op, mem_V⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : TopologicalSpace α
π : α → β
s : Set β
a : α
hs : s ∈ 𝓝 (π a)
this : TopologicalSpace β := TopologicalSpace.coinduced π inst✝
⊢ π ⁻¹' s ∈ 𝓝 a
state_after: case intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : TopologicalSpace α
π : α → β
s : Set β
a : α
hs : s ∈ 𝓝 (π a)
this : TopologicalSpace β := TopologicalSpace.coinduced π inst✝
V : Set β
hVs : V ⊆ s
V_op : IsOpen V
mem_V : π a ∈ V
⊢ π ⁻¹' s ∈ 𝓝 a

tactic: exact mem_nhds_iff.mpr ⟨π ⁻¹' V, Set.preimage_mono hVs, V_op, mem_V⟩
state_before: case intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : TopologicalSpace α
π : α → β
s : Set β
a : α
hs : s ∈ 𝓝 (π a)
this : TopologicalSpace β := TopologicalSpace.coinduced π inst✝
V : Set β
hVs : V ⊆ s
V_op : IsOpen V
mem_V : π a ∈ V
⊢ π ⁻¹' s ∈ 𝓝 a
state_after: no goals
Theorem: ContractingWith.edist_efixedPoint_le
File: Mathlib/Topology/MetricSpace/Contracting.lean

tactic: convert hf.apriori_edist_iterate_efixedPoint_le hx 0
state_before: α : Type u_1
inst✝ : EMetricSpace α
cs : CompleteSpace α
K : ℝ≥0
f : α → α
hf : ContractingWith K f
x : α
hx : edist x (f x) ≠ ⊤
⊢ edist x (efixedPoint f hf x hx) ≤ edist x (f x) / (1 - ↑K)
state_after: case h.e'_4.h.e'_5
α : Type u_1
inst✝ : EMetricSpace α
cs : CompleteSpace α
K : ℝ≥0
f : α → α
hf : ContractingWith K f
x : α
hx : edist x (f x) ≠ ⊤
⊢ edist x (f x) = edist x (f x) * ↑K ^ 0

tactic: simp only [pow_zero, mul_one]
state_before: case h.e'_4.h.e'_5
α : Type u_1
inst✝ : EMetricSpace α
cs : CompleteSpace α
K : ℝ≥0
f : α → α
hf : ContractingWith K f
x : α
hx : edist x (f x) ≠ ⊤
⊢ edist x (f x) = edist x (f x) * ↑K ^ 0
state_after: no goals
Theorem: Rel.preimage_eq_codom_of_domain_subset
File: Mathlib/Data/Rel.lean

tactic: apply r.inv.image_eq_dom_of_codomain_subset (by rwa [← codom_inv] at h)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
h : r.dom ⊆ s
⊢ r.image s = r.codom
state_after: no goals

tactic: rwa [← codom_inv] at h
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
h : r.dom ⊆ s
⊢ r.inv.codom ⊆ s
state_after: no goals
Theorem: existsUnique_add_zsmul_mem_Ioc
File: Mathlib/Algebra/Order/Archimedean.lean

tactic: simpa only [add_zsmul, sub_lt_iff_lt_add', le_sub_iff_add_le', ← add_assoc, and_comm, mem_Ioc,
  Equiv.coe_addRight, one_zsmul, add_le_add_iff_right] using
  existsUnique_zsmul_near_of_pos ha (c - b)
state_before: α : Type u_1
M : Type u_2
inst✝¹ : LinearOrderedAddCommGroup α
inst✝ : Archimedean α
a : α
ha : 0 < a
b c : α
⊢ ∃! x, b + (Equiv.addRight 1) x • a ∈ Ioc c (c + a)
state_after: no goals
Theorem: Finset.preimage_univ
File: Mathlib/Data/Finset/Preimage.lean

tactic: simp
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
f : α → β
inst✝¹ : Fintype α
inst✝ : Fintype β
hf : InjOn f (f ⁻¹' ↑univ)
⊢ ↑(univ.preimage f hf) = ↑univ
state_after: no goals
Theorem: ContinuousMap.inf_mem_subalgebra_closure
File: Mathlib/Topology/ContinuousFunction/StoneWeierstrass.lean

tactic: rw [inf_eq_half_smul_add_sub_abs_sub' ℝ]
state_before: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
f g : ↥A
⊢ ↑f ⊓ ↑g ∈ A.topologicalClosure
state_after: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
f g : ↥A
⊢ 2⁻¹ • (↑f + ↑g - |↑g - ↑f|) ∈ A.topologicalClosure

tactic: refine
  A.topologicalClosure.smul_mem
    (A.topologicalClosure.sub_mem
      (A.topologicalClosure.add_mem (A.le_topologicalClosure f.property)
        (A.le_topologicalClosure g.property))
      ?_)
    _
state_before: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
f g : ↥A
⊢ 2⁻¹ • (↑f + ↑g - |↑g - ↑f|) ∈ A.topologicalClosure
state_after: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
f g : ↥A
⊢ |↑g - ↑f| ∈ A.topologicalClosure

tactic: exact mod_cast abs_mem_subalgebra_closure A _
state_before: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
f g : ↥A
⊢ |↑g - ↑f| ∈ A.topologicalClosure
state_after: no goals