1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: RelSeries.last_append
File: Mathlib/Order/RelSeries.lean

tactic: delta last
state_before: α : Type u_1
r : Rel α α
β : Type u_2
s : Rel β β
p q : RelSeries r
connect : r p.last q.head
⊢ (p.append q connect).last = q.last
state_after: α : Type u_1
r : Rel α α
β : Type u_2
s : Rel β β
p q : RelSeries r
connect : r p.last q.head
⊢ (p.append q connect).toFun (Fin.last (p.append q connect).length) = q.toFun (Fin.last q.length)

tactic: convert append_apply_right p q connect (Fin.last _)
state_before: α : Type u_1
r : Rel α α
β : Type u_2
s : Rel β β
p q : RelSeries r
connect : r p.last q.head
⊢ (p.append q connect).toFun (Fin.last (p.append q connect).length) = q.toFun (Fin.last q.length)
state_after: case h.e'_2.h.e'_4
α : Type u_1
r : Rel α α
β : Type u_2
s : Rel β β
p q : RelSeries r
connect : r p.last q.head
⊢ Fin.last (p.append q connect).length = ↑↑(Fin.natAdd p.length (Fin.last q.length)) + 1

tactic: ext
state_before: case h.e'_2.h.e'_4
α : Type u_1
r : Rel α α
β : Type u_2
s : Rel β β
p q : RelSeries r
connect : r p.last q.head
⊢ Fin.last (p.append q connect).length = ↑↑(Fin.natAdd p.length (Fin.last q.length)) + 1
state_after: case h.e'_2.h.e'_4.h
α : Type u_1
r : Rel α α
β : Type u_2
s : Rel β β
p q : RelSeries r
connect : r p.last q.head
⊢ ↑(Fin.last (p.append q connect).length) = ↑(↑↑(Fin.natAdd p.length (Fin.last q.length)) + 1)

tactic: change _ = _ % _
state_before: case h.e'_2.h.e'_4.h
α : Type u_1
r : Rel α α
β : Type u_2
s : Rel β β
p q : RelSeries r
connect : r p.last q.head
⊢ ↑(Fin.last (p.append q connect).length) = ↑(↑↑(Fin.natAdd p.length (Fin.last q.length)) + 1)
state_after: case h.e'_2.h.e'_4.h
α : Type u_1
r : Rel α α
β : Type u_2
s : Rel β β
p q : RelSeries r
connect : r p.last q.head
⊢ ↑(Fin.last (p.append q connect).length) =
    (↑(Fin.natAdd p.length (Fin.last q.length)) % ((p.append q connect).length + 1) +
        1 % ((p.append q connect).length + 1)) %
      ((p.append q connect).length + 1)

tactic: simp only [append_length, Fin.val_last, Fin.natAdd_last, Nat.one_mod, Nat.mod_add_mod,
  Nat.mod_succ]
state_before: case h.e'_2.h.e'_4.h
α : Type u_1
r : Rel α α
β : Type u_2
s : Rel β β
p q : RelSeries r
connect : r p.last q.head
⊢ ↑(Fin.last (p.append q connect).length) =
    (↑(Fin.natAdd p.length (Fin.last q.length)) % ((p.append q connect).length + 1) +
        1 % ((p.append q connect).length + 1)) %
      ((p.append q connect).length + 1)
state_after: no goals
Theorem: Finset.card_le_card_of_injOn
File: Mathlib/Data/Finset/Card.lean

tactic: classical
calc
  s.card = (s.image f).card := (card_image_of_injOn f_inj).symm
  _      ≤ t.card           := card_le_card <| image_subset_iff.2 hf
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t✝ u : Finset α
f✝ : α → β
n : ℕ
t : Finset β
f : α → β
hf : ∀ a ∈ s, f a ∈ t
f_inj : Set.InjOn f ↑s
⊢ s.card ≤ t.card
state_after: no goals

tactic: calc
  s.card = (s.image f).card := (card_image_of_injOn f_inj).symm
  _      ≤ t.card           := card_le_card <| image_subset_iff.2 hf
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t✝ u : Finset α
f✝ : α → β
n : ℕ
t : Finset β
f : α → β
hf : ∀ a ∈ s, f a ∈ t
f_inj : Set.InjOn f ↑s
⊢ s.card ≤ t.card
state_after: no goals
Theorem: Nat.cofinite_eq_atTop
File: Mathlib/Order/Filter/Cofinite.lean

tactic: refine le_antisymm ?_ atTop_le_cofinite
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
l : Filter α
⊢ cofinite = atTop
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
l : Filter α
⊢ cofinite ≤ atTop

tactic: refine atTop_basis.ge_iff.2 fun N _ => ?_
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
l : Filter α
⊢ cofinite ≤ atTop
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
l : Filter α
N : ℕ
x✝ : True
⊢ Ici N ∈ cofinite

tactic: simpa only [mem_cofinite, compl_Ici] using finite_lt_nat N
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
l : Filter α
N : ℕ
x✝ : True
⊢ Ici N ∈ cofinite
state_after: no goals
Theorem: Real.floor_logb_natCast
File: Mathlib/Analysis/SpecialFunctions/Log/Base.lean

tactic: obtain rfl | hr := hr.eq_or_lt
state_before: b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr : 0 ≤ r
⊢ ⌊logb (↑b) r⌋ = Int.log b r
state_after: case inl
b✝ x y : ℝ
b : ℕ
hb : 1 < b
hr : 0 ≤ 0
⊢ ⌊logb (↑b) 0⌋ = Int.log b 0

case inr
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
⊢ ⌊logb (↑b) r⌋ = Int.log b r

tactic: have hb1' : 1 < (b : ℝ) := Nat.one_lt_cast.mpr hb
state_before: case inr
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
⊢ ⌊logb (↑b) r⌋ = Int.log b r
state_after: case inr
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ⌊logb (↑b) r⌋ = Int.log b r

tactic: apply le_antisymm
state_before: case inr
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ⌊logb (↑b) r⌋ = Int.log b r
state_after: case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ⌊logb (↑b) r⌋ ≤ Int.log b r

case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ Int.log b r ≤ ⌊logb (↑b) r⌋

tactic: rw [logb_zero, Int.log_zero_right, Int.floor_zero]
state_before: case inl
b✝ x y : ℝ
b : ℕ
hb : 1 < b
hr : 0 ≤ 0
⊢ ⌊logb (↑b) 0⌋ = Int.log b 0
state_after: no goals

tactic: rw [← Int.zpow_le_iff_le_log hb hr, ← rpow_intCast b]
state_before: case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ⌊logb (↑b) r⌋ ≤ Int.log b r
state_after: case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ↑b ^ ↑⌊logb (↑b) r⌋ ≤ r

tactic: refine le_of_le_of_eq ?_ (rpow_logb (zero_lt_one.trans hb1') hb1'.ne' hr)
state_before: case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ↑b ^ ↑⌊logb (↑b) r⌋ ≤ r
state_after: case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ↑b ^ ↑⌊logb (↑b) r⌋ ≤ ↑b ^ logb (↑b) r

tactic: exact rpow_le_rpow_of_exponent_le hb1'.le (Int.floor_le _)
state_before: case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ↑b ^ ↑⌊logb (↑b) r⌋ ≤ ↑b ^ logb (↑b) r
state_after: no goals

tactic: rw [Int.le_floor, le_logb_iff_rpow_le hb1' hr, rpow_intCast]
state_before: case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ Int.log b r ≤ ⌊logb (↑b) r⌋
state_after: case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ↑b ^ Int.log b r ≤ r

tactic: exact Int.zpow_log_le_self hb hr
state_before: case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ↑b ^ Int.log b r ≤ r
state_after: no goals
Theorem: QuaternionAlgebra.Basis.lift_zero
File: Mathlib/Algebra/QuaternionBasis.lean

tactic: simp [lift]
state_before: R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
c₁ c₂ : R
q : Basis A c₁ c₂
⊢ q.lift 0 = 0
state_after: no goals
Theorem: Pretrivialization.toPartialEquiv_injective
File: Mathlib/Topology/FiberBundle/Trivialization.lean

tactic: refine fun e e' h ↦ ext' _ _ h ?_
state_before: ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝² : TopologicalSpace B
inst✝¹ : TopologicalSpace F
proj : Z → B
e : Pretrivialization F proj
x : Z
inst✝ : Nonempty F
⊢ Injective toPartialEquiv
state_after: ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝² : TopologicalSpace B
inst✝¹ : TopologicalSpace F
proj : Z → B
e✝ : Pretrivialization F proj
x : Z
inst✝ : Nonempty F
e e' : Pretrivialization F proj
h : e.toPartialEquiv = e'.toPartialEquiv
⊢ e.baseSet = e'.baseSet
Theorem: SetTheory.PGame.Domineering.card_of_mem_left
File: Mathlib/SetTheory/Game/Domineering.lean

tactic: have w₁ : m ∈ b := (Finset.mem_inter.1 h).1
state_before: b : Board
m : ℤ × ℤ
h : m ∈ left b
⊢ 2 ≤ Finset.card b
state_after: b : Board
m : ℤ × ℤ
h : m ∈ left b
w₁ : m ∈ b
⊢ 2 ≤ Finset.card b

tactic: have w₂ : (m.1, m.2 - 1) ∈ b.erase m := snd_pred_mem_erase_of_mem_left h
state_before: b : Board
m : ℤ × ℤ
h : m ∈ left b
w₁ : m ∈ b
⊢ 2 ≤ Finset.card b
state_after: b : Board
m : ℤ × ℤ
h : m ∈ left b
w₁ : m ∈ b
w₂ : (m.1, m.2 - 1) ∈ Finset.erase b m
⊢ 2 ≤ Finset.card b

tactic: have i₁ := Finset.card_erase_lt_of_mem w₁
state_before: b : Board
m : ℤ × ℤ
h : m ∈ left b
w₁ : m ∈ b
w₂ : (m.1, m.2 - 1) ∈ Finset.erase b m
⊢ 2 ≤ Finset.card b
state_after: b : Board
m : ℤ × ℤ
h : m ∈ left b
w₁ : m ∈ b
w₂ : (m.1, m.2 - 1) ∈ Finset.erase b m
i₁ : (Finset.erase b m).card < Finset.card b
⊢ 2 ≤ Finset.card b

tactic: have i₂ := Nat.lt_of_le_of_lt (Nat.zero_le _) (Finset.card_erase_lt_of_mem w₂)
state_before: b : Board
m : ℤ × ℤ
h : m ∈ left b
w₁ : m ∈ b
w₂ : (m.1, m.2 - 1) ∈ Finset.erase b m
i₁ : (Finset.erase b m).card < Finset.card b
⊢ 2 ≤ Finset.card b
state_after: b : Board
m : ℤ × ℤ
h : m ∈ left b
w₁ : m ∈ b
w₂ : (m.1, m.2 - 1) ∈ Finset.erase b m
i₁ : (Finset.erase b m).card < Finset.card b
i₂ : 0 < (Finset.erase b m).card
⊢ 2 ≤ Finset.card b

tactic: exact Nat.lt_of_le_of_lt i₂ i₁
state_before: b : Board
m : ℤ × ℤ
h : m ∈ left b
w₁ : m ∈ b
w₂ : (m.1, m.2 - 1) ∈ Finset.erase b m
i₁ : (Finset.erase b m).card < Finset.card b
i₂ : 0 < (Finset.erase b m).card
⊢ 2 ≤ Finset.card b
state_after: no goals
Theorem: CategoryTheory.shiftFunctorAdd'_zero_add_inv_app
File: Mathlib/CategoryTheory/Shift/Basic.lean

tactic: simpa using NatTrans.congr_app (congr_arg Iso.inv (shiftFunctorAdd'_zero_add C a)) X
state_before: C : Type u
A : Type u_1
inst✝² : Category.{v, u} C
inst✝¹ : AddMonoid A
inst✝ : HasShift C A
a : A
X : C
⊢ (shiftFunctorAdd' C 0 a a ⋯).inv.app X = (shiftFunctor C a).map ((shiftFunctorZero C A).hom.app X)
state_after: no goals
Theorem: WithTop.image_coe_Ioc
File: Mathlib/Order/Interval/Set/WithBotTop.lean

tactic: rw [← preimage_coe_Ioc, image_preimage_eq_inter_range, range_coe,
  inter_eq_self_of_subset_left
    (Subset.trans Ioc_subset_Iic_self <| Iic_subset_Iio.2 <| coe_lt_top b)]
state_before: α : Type u_1
inst✝ : Preorder α
a b : α
⊢ some '' Ioc a b = Ioc ↑a ↑b
state_after: no goals
Theorem: MeasureTheory.Lp.norm_const_le
File: Mathlib/MeasureTheory/Function/LpSpace.lean

tactic: rw [← indicatorConstLp_univ]
state_before: α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedAddCommGroup G
inst✝ : IsFiniteMeasure μ
c : E
⊢ ‖(Lp.const p μ) c‖ ≤ ‖c‖ * (μ Set.univ).toReal ^ (1 / p.toReal)
state_after: α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedAddCommGroup G
inst✝ : IsFiniteMeasure μ
c : E
⊢ ‖indicatorConstLp p ⋯ ⋯ c‖ ≤ ‖c‖ * (μ Set.univ).toReal ^ (1 / p.toReal)

tactic: exact norm_indicatorConstLp_le
state_before: α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedAddCommGroup G
inst✝ : IsFiniteMeasure μ
c : E
⊢ ‖indicatorConstLp p ⋯ ⋯ c‖ ≤ ‖c‖ * (μ Set.univ).toReal ^ (1 / p.toReal)
state_after: no goals
Theorem: Irrational.mul_cases
File: Mathlib/Data/Real/Irrational.lean

tactic: delta Irrational
state_before: q : ℚ
x y : ℝ
⊢ Irrational (x * y) → Irrational x ∨ Irrational y
state_after: q : ℚ
x y : ℝ
⊢ x * y ∉ Set.range Rat.cast → x ∉ Set.range Rat.cast ∨ y ∉ Set.range Rat.cast

tactic: contrapose!
state_before: q : ℚ
x y : ℝ
⊢ x * y ∉ Set.range Rat.cast → x ∉ Set.range Rat.cast ∨ y ∉ Set.range Rat.cast
state_after: q : ℚ
x y : ℝ
⊢ x ∈ Set.range Rat.cast ∧ y ∈ Set.range Rat.cast → x * y ∈ Set.range Rat.cast

tactic: rintro ⟨⟨rx, rfl⟩, ⟨ry, rfl⟩⟩
state_before: q : ℚ
x y : ℝ
⊢ x ∈ Set.range Rat.cast ∧ y ∈ Set.range Rat.cast → x * y ∈ Set.range Rat.cast
state_after: case intro.intro.intro
q rx ry : ℚ
⊢ ↑rx * ↑ry ∈ Set.range Rat.cast

tactic: exact ⟨rx * ry, cast_mul rx ry⟩
state_before: case intro.intro.intro
q rx ry : ℚ
⊢ ↑rx * ↑ry ∈ Set.range Rat.cast
state_after: no goals
Theorem: Ordinal.cof_bsup_le_lift
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

tactic: rw [← bsup_eq_blsub_iff_lt_bsup.{u, v}] at H
state_before: α : Type u_1
r : α → α → Prop
o : Ordinal.{u}
f : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}
H : ∀ (i : Ordinal.{u}) (h : i < o), f i h < o.bsup f
⊢ (o.bsup f).cof ≤ Cardinal.lift.{v, u} o.card
state_after: α : Type u_1
r : α → α → Prop
o : Ordinal.{u}
f : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}
H : o.bsup f = o.blsub f
⊢ (o.bsup f).cof ≤ Cardinal.lift.{v, u} o.card

tactic: rw [H]
state_before: α : Type u_1
r : α → α → Prop
o : Ordinal.{u}
f : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}
H : o.bsup f = o.blsub f
⊢ (o.bsup f).cof ≤ Cardinal.lift.{v, u} o.card
state_after: α : Type u_1
r : α → α → Prop
o : Ordinal.{u}
f : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}
H : o.bsup f = o.blsub f
⊢ (o.blsub f).cof ≤ Cardinal.lift.{v, u} o.card

tactic: exact cof_blsub_le_lift.{u, v} f
state_before: α : Type u_1
r : α → α → Prop
o : Ordinal.{u}
f : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}
H : o.bsup f = o.blsub f
⊢ (o.blsub f).cof ≤ Cardinal.lift.{v, u} o.card
state_after: no goals
Theorem: ContinuousMap.exists_mem_subalgebra_near_continuousMap_of_separatesPoints
File: Mathlib/Topology/ContinuousFunction/StoneWeierstrass.lean

tactic: have w :=
  mem_closure_iff_frequently.mp (continuousMap_mem_subalgebra_closure_of_separatesPoints A w f)
state_before: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
w : A.SeparatesPoints
f : C(X, ℝ)
ε : ℝ
pos : 0 < ε
⊢ ∃ g, ‖↑g - f‖ < ε
state_after: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
w✝ : A.SeparatesPoints
f : C(X, ℝ)
ε : ℝ
pos : 0 < ε
w : ∃ᶠ (x : C(X, ℝ)) in 𝓝 f, x ∈ ↑A
⊢ ∃ g, ‖↑g - f‖ < ε

tactic: rw [Metric.nhds_basis_ball.frequently_iff] at w
state_before: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
w✝ : A.SeparatesPoints
f : C(X, ℝ)
ε : ℝ
pos : 0 < ε
w : ∃ᶠ (x : C(X, ℝ)) in 𝓝 f, x ∈ ↑A
⊢ ∃ g, ‖↑g - f‖ < ε
state_after: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
w✝ : A.SeparatesPoints
f : C(X, ℝ)
ε : ℝ
pos : 0 < ε
w : ∀ (i : ℝ), 0 < i → ∃ x ∈ Metric.ball f i, x ∈ ↑A
⊢ ∃ g, ‖↑g - f‖ < ε

tactic: obtain ⟨g, H, m⟩ := w ε pos
state_before: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
w✝ : A.SeparatesPoints
f : C(X, ℝ)
ε : ℝ
pos : 0 < ε
w : ∀ (i : ℝ), 0 < i → ∃ x ∈ Metric.ball f i, x ∈ ↑A
⊢ ∃ g, ‖↑g - f‖ < ε
state_after: case intro.intro
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
w✝ : A.SeparatesPoints
f : C(X, ℝ)
ε : ℝ
pos : 0 < ε
w : ∀ (i : ℝ), 0 < i → ∃ x ∈ Metric.ball f i, x ∈ ↑A
g : C(X, ℝ)
H : g ∈ Metric.ball f ε
m : g ∈ ↑A
⊢ ∃ g, ‖↑g - f‖ < ε

tactic: rw [Metric.mem_ball, dist_eq_norm] at H
state_before: case intro.intro
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
w✝ : A.SeparatesPoints
f : C(X, ℝ)
ε : ℝ
pos : 0 < ε
w : ∀ (i : ℝ), 0 < i → ∃ x ∈ Metric.ball f i, x ∈ ↑A
g : C(X, ℝ)
H : g ∈ Metric.ball f ε
m : g ∈ ↑A
⊢ ∃ g, ‖↑g - f‖ < ε
state_after: case intro.intro
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
w✝ : A.SeparatesPoints
f : C(X, ℝ)
ε : ℝ
pos : 0 < ε
w : ∀ (i : ℝ), 0 < i → ∃ x ∈ Metric.ball f i, x ∈ ↑A
g : C(X, ℝ)
H : ‖g - f‖ < ε
m : g ∈ ↑A
⊢ ∃ g, ‖↑g - f‖ < ε

tactic: exact ⟨⟨g, m⟩, H⟩
state_before: case intro.intro
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
w✝ : A.SeparatesPoints
f : C(X, ℝ)
ε : ℝ
pos : 0 < ε
w : ∀ (i : ℝ), 0 < i → ∃ x ∈ Metric.ball f i, x ∈ ↑A
g : C(X, ℝ)
H : ‖g - f‖ < ε
m : g ∈ ↑A
⊢ ∃ g, ‖↑g - f‖ < ε
state_after: no goals
Theorem: ADEInequality.sumInv_pqr
File: Mathlib/NumberTheory/ADEInequality.lean

tactic: simp only [sumInv, add_zero, insert_eq_cons, add_assoc, map_cons, sum_cons,
  map_singleton, sum_singleton]
state_before: p q r : ℕ+
⊢ sumInv {p, q, r} = (↑↑p)⁻¹ + (↑↑q)⁻¹ + (↑↑r)⁻¹
state_after: no goals
Theorem: Holor.mul_scalar_mul
File: Mathlib/Data/Holor.lean

tactic: simp (config := { unfoldPartialApp := true }) [mul, SMul.smul, HolorIndex.take, HolorIndex.drop,
  HSMul.hSMul]
state_before: α : Type
d : ℕ
ds ds₁ ds₂ ds₃ : List ℕ
inst✝ : Monoid α
x : Holor α []
y : Holor α ds
⊢ x ⊗ y = x ⟨[], ⋯⟩ • y
state_after: no goals
Theorem: WithSeminorms.isOpen_iff_mem_balls
File: Mathlib/Analysis/LocallyConvex/WithSeminorms.lean

tactic: simp_rw [← WithSeminorms.mem_nhds_iff hp _ U, isOpen_iff_mem_nhds]
state_before: 𝕜 : Type u_1
𝕜₂ : Type u_2
𝕝 : Type u_3
𝕝₂ : Type u_4
E : Type u_5
F : Type u_6
G : Type u_7
ι : Type u_8
ι' : Type u_9
inst✝⁴ : NormedField 𝕜
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : Nonempty ι
inst✝ : TopologicalSpace E
p : SeminormFamily 𝕜 E ι
hp : WithSeminorms p
U : Set E
⊢ IsOpen U ↔ ∀ x ∈ U, ∃ s, ∃ r > 0, (s.sup p).ball x r ⊆ U
state_after: no goals
Theorem: padicValInt.self
File: Mathlib/NumberTheory/Padics/PadicVal.lean

tactic: simp [padicValNat.self hp]
state_before: p : ℕ
hp : 1 < p
⊢ padicValInt p ↑p = 1
state_after: no goals
Theorem: Function.Injective.map_swap
File: Mathlib/Logic/Equiv/Basic.lean

tactic: conv_rhs => rw [Equiv.swap_apply_def]
state_before: α : Sort u_1
β : Sort u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
hf : Injective f
x y z : α
⊢ f ((Equiv.swap x y) z) = (Equiv.swap (f x) (f y)) (f z)
state_after: α : Sort u_1
β : Sort u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
hf : Injective f
x y z : α
⊢ f ((Equiv.swap x y) z) = if f z = f x then f y else if f z = f y then f x else f z

tactic: split_ifs with h₁ h₂
state_before: α : Sort u_1
β : Sort u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
hf : Injective f
x y z : α
⊢ f ((Equiv.swap x y) z) = if f z = f x then f y else if f z = f y then f x else f z
state_after: case pos
α : Sort u_1
β : Sort u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
hf : Injective f
x y z : α
h₁ : f z = f x
⊢ f ((Equiv.swap x y) z) = f y

case pos
α : Sort u_1
β : Sort u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
hf : Injective f
x y z : α
h₁ : ¬f z = f x
h₂ : f z = f y
⊢ f ((Equiv.swap x y) z) = f x

case neg
α : Sort u_1
β : Sort u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
hf : Injective f
x y z : α
h₁ : ¬f z = f x
h₂ : ¬f z = f y
⊢ f ((Equiv.swap x y) z) = f z

tactic: rw [hf h₁, Equiv.swap_apply_left]
state_before: case pos
α : Sort u_1
β : Sort u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
hf : Injective f
x y z : α
h₁ : f z = f x
⊢ f ((Equiv.swap x y) z) = f y
state_after: no goals

tactic: rw [hf h₂, Equiv.swap_apply_right]
state_before: case pos
α : Sort u_1
β : Sort u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
hf : Injective f
x y z : α
h₁ : ¬f z = f x
h₂ : f z = f y
⊢ f ((Equiv.swap x y) z) = f x
state_after: no goals

tactic: rw [Equiv.swap_apply_of_ne_of_ne (mt (congr_arg f) h₁) (mt (congr_arg f) h₂)]
state_before: case neg
α : Sort u_1
β : Sort u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
hf : Injective f
x y z : α
h₁ : ¬f z = f x
h₂ : ¬f z = f y
⊢ f ((Equiv.swap x y) z) = f z
state_after: no goals
Theorem: HilbertBasis.orthonormal
File: Mathlib/Analysis/InnerProductSpace/l2Space.lean

tactic: rw [orthonormal_iff_ite]
state_before: ι : Type u_1
𝕜 : Type u_2
inst✝⁴ : RCLike 𝕜
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
cplt : CompleteSpace E
G : ι → Type u_4
inst✝¹ : (i : ι) → NormedAddCommGroup (G i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)
b : HilbertBasis ι 𝕜 E
⊢ Orthonormal 𝕜 fun i => b.repr.symm (lp.single 2 i 1)
state_after: ι : Type u_1
𝕜 : Type u_2
inst✝⁴ : RCLike 𝕜
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
cplt : CompleteSpace E
G : ι → Type u_4
inst✝¹ : (i : ι) → NormedAddCommGroup (G i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)
b : HilbertBasis ι 𝕜 E
⊢ ∀ (i j : ι), ⟪b.repr.symm (lp.single 2 i 1), b.repr.symm (lp.single 2 j 1)⟫_𝕜 = if i = j then 1 else 0

tactic: intro i j
state_before: ι : Type u_1
𝕜 : Type u_2
inst✝⁴ : RCLike 𝕜
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
cplt : CompleteSpace E
G : ι → Type u_4
inst✝¹ : (i : ι) → NormedAddCommGroup (G i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)
b : HilbertBasis ι 𝕜 E
⊢ ∀ (i j : ι), ⟪b.repr.symm (lp.single 2 i 1), b.repr.symm (lp.single 2 j 1)⟫_𝕜 = if i = j then 1 else 0
state_after: ι : Type u_1
𝕜 : Type u_2
inst✝⁴ : RCLike 𝕜
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
cplt : CompleteSpace E
G : ι → Type u_4
inst✝¹ : (i : ι) → NormedAddCommGroup (G i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)
b : HilbertBasis ι 𝕜 E
i j : ι
⊢ ⟪b.repr.symm (lp.single 2 i 1), b.repr.symm (lp.single 2 j 1)⟫_𝕜 = if i = j then 1 else 0

tactic: rw [← b.repr.inner_map_map (b i) (b j), b.repr_self, b.repr_self, lp.inner_single_left,
  lp.single_apply]
state_before: ι : Type u_1
𝕜 : Type u_2
inst✝⁴ : RCLike 𝕜
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
cplt : CompleteSpace E
G : ι → Type u_4
inst✝¹ : (i : ι) → NormedAddCommGroup (G i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)
b : HilbertBasis ι 𝕜 E
i j : ι
⊢ ⟪b.repr.symm (lp.single 2 i 1), b.repr.symm (lp.single 2 j 1)⟫_𝕜 = if i = j then 1 else 0
state_after: ι : Type u_1
𝕜 : Type u_2
inst✝⁴ : RCLike 𝕜
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
cplt : CompleteSpace E
G : ι → Type u_4
inst✝¹ : (i : ι) → NormedAddCommGroup (G i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)
b : HilbertBasis ι 𝕜 E
i j : ι
⊢ ⟪1, if h : i = j then ⋯ ▸ 1 else 0⟫_𝕜 = if i = j then 1 else 0

tactic: simp
state_before: ι : Type u_1
𝕜 : Type u_2
inst✝⁴ : RCLike 𝕜
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
cplt : CompleteSpace E
G : ι → Type u_4
inst✝¹ : (i : ι) → NormedAddCommGroup (G i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)
b : HilbertBasis ι 𝕜 E
i j : ι
⊢ ⟪1, if h : i = j then ⋯ ▸ 1 else 0⟫_𝕜 = if i = j then 1 else 0
state_after: no goals
Theorem: SimpleGraph.Subgraph.verts_iSup
File: Mathlib/Combinatorics/SimpleGraph/Subgraph.lean

tactic: simp [iSup]
state_before: ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : G.Subgraph
a b : V
f : ι → G.Subgraph
⊢ (⨆ i, f i).verts = ⋃ i, (f i).verts
state_after: no goals